prefix Property

MSXML 5.0 SDK

Microsoft XML Core Services (MSXML) 5.0 for Microsoft Office - DOM Reference

prefix Property

Returns the namespace prefix.

[Script]

Script Syntax

strValue = oXMLDOMNode.prefix;
[Visual Basic]

Visual Basic Syntax

strValue = oXMLDOMNode.prefix
[C/C++]

C/C++ Syntax

HRESULT get_prefix(
    BSTR *prefixString);

Parameters

prefixString [out, retval]
The namespace prefix specified on the element, attribute, or entity reference. For example, for the element <xxx:yyy>, it returns xxx. It returns an empty string, "", if no prefix is specified.

C/C++ Return Values

S_OK
The value returned if successful.
S_FALSE
The value returned when there is no prefix.
E_INVALIDARG
The value returned if the prefixString parameter is Null.

Remarks

String. The property is read-only. It returns the namespace prefix specified. For example, for the element <xxx:yyy>, it returns "xxx". It returns an empty string, "", if no prefix is specified.

This member is an extension of the World Wide Web Consortium (W3C) Document Object Model (DOM).

To view reference information for Visual Basic, C/C++, or Script only, click the Language Filter button Language Filter in the upper-left corner of the page.

See Also

Applies to: IXMLDOMAttribute | IXMLDOMCDATASection | IXMLDOMCharacterData | IXMLDOMComment | DOMDocument | IXMLDOMDocumentFragment | DOMDocumentType | IXMLDOMElement | IXMLDOMEntity | IXMLDOMEntityReference | IXMLDOMNode | IXMLDOMNotation | IXMLDOMProcessingInstruction | IXMLDOMText