Click to return to the XML (Extensible Markup Language) home page    
IXMLDOMNode::nextSibling ...     IXMLDOMNode::nodeType Pro...     IXMLDOMNode Interface    
Web Workshop  |  XML (Extensible Markup Language)

IXMLDOMNode::get_nodeName Method


Contains the qualified name of the element, attribute, or entity reference, or a fixed string for other node types.

Visual Basic Syntax

strValue = oXMLDOMNode.nodeName

C/C++ Syntax

HRESULT get_nodeName(
    BSTR *name);

Parameters

name
[out] Node name, which varies depending on the node type.

C/C++ Return Value

S_OK
Value returned if successful.
E_INVALIDARG
Value returned if name is null.

Remarks

This value depends on the value of the nodeType property.

NODE_ATTRIBUTE
The name of the attribute.
NODE_CDATA_SECTION
The literal string "#cdata-section".
NODE_COMMENT
The literal string "#comment".
NODE_DOCUMENT
The literal string "#document".
NODE_DOCUMENT_TYPE
The name of the document type. For example, xxx in <!DOCTYPE xxx ...>.
NODE_DOCUMENT_FRAGMENT
The literal string "#document-fragment".
NODE_ELEMENT
The name of the XML tag, with any namespace prefix included if present.
NODE_ENTITY
The name of the entity.
NODE_ENTITY_REFERENCE
The name of the entity referenced. Note that the name does not include the leading ampersand or the trailing semicolon. The name includes the namespace if one is present.
NODE_NOTATION
The name of the notation.
NODE_PROCESSING_INSTRUCTION
The target; the first token following the <? characters.
NODE_TEXT
The literal string "#text".

This method returns the qualified name for the element, attribute, or entity reference. For example, it returns xxx:yyy for the element <xxx:yyy>. The nodeName property always returns a non-empty string.



Back to topBack to top

Did you find this topic useful? Suggestions for other topics? Write us!

© 1999 Microsoft Corporation. All rights reserved. Terms of use.