Windows apps
Collapse the table of content
Expand the table of content
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

nodeTypeString Property

 

Returns the node type in string form.

strValue = oXMLDOMNode.nodeTypeString;  

Example

The following script example creates an IXMLDOMNode object and displays its node type in string form, in this case, "element".

var xmlDoc = new ActiveXObject("Msxml2.DOMDocument.3.0");
var currNode;
xmlDoc.async = false;
xmlDoc.load("books.xml");
if (xmlDoc.parseError.errorCode != 0) {
   var myErr = xmlDoc.parseError;
   WScript.Echo("You have error " + myErr.reason);
} else {
   currNode = xmlDoc.documentElement.childNodes.item(0);
   WScript.Echo(currNode.nodeTypeString);
}

strValue = oXMLDOMNode.nodeTypeString  

HRESULT get_nodeTypeString(  
    BSTR *nodeType);  

Parameters

nodeType[out, retval]
String version of the node type.

C/C++ Return Values

S_OK
Value returned if successful.

E_INVALIDARG
Value returned if the nodeType parameter is Null.

String. The property is read-only. It contains the string version of the node type. To return the enumeration value, use the nodeType property.

This value depends on the value of the nodeType property.

NODE_ATTRIBUTEattribute
NODE_CDATA_SECTIONcdatasection
NODE_COMMENTcomment
NODE_DOCUMENTdocument
NODE_DOCUMENT_FRAGMENTdocumentfragment
NODE_DOCUMENT_TYPEdocumenttype
NODE_ELEMENTelement
NODE_ENTITYentity
NODE_ENTITY_REFERENCEentityreference
NODE_NOTATIONnotation
NODE_PROCESSING_INSTRUCTIONprocessinginstruction
NODE_TEXTtext

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

Implemented in:

MSXML 3.0, MSXML 6.0

IXMLDOMAttribute | IXMLDOMCDATASection | IXMLDOMCharacterData | IXMLDOMComment | IXMLDOMDocument-DOMDocument | IXMLDOMDocumentFragment | IXMLDOMDocumentType | IXMLDOMElement | IXMLDOMEntity | IXMLDOMEntityReference | IXMLDOMNode | IXMLDOMNotation | IXMLDOMProcessingInstruction | IXMLDOMText

nodeType Property1

Show:
© 2017 Microsoft