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.

baseName Property

 

Returns the base name for the name qualified with the namespace.

strValue = oXMLDOMNode.baseName;  

Example

The following script example assigns the value of a node's baseName property to a string, and then displays it.

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

strValue = oXMLDOMNode.baseName  

HRESULT get_baseName(  
    BSTR *nameString);  

Parameters

nameString[out, retval]
The right-hand side of a namespace qualified name. For example, it returns yyy for the element <xxx:yyy>. It always returns a nonempty string.

C/C++ Return Values

S_OK
The value returned if successful.

S_FALSE
The value returned when there is no base name.

E_INVALIDARG
The value returned if the nameString parameter is Null.

String. The property is read-only. It returns the right-hand side of a namespace-qualified name. For example, it returns "yyy" for the element <xxx:yyy>. It always returns a nonempty string.

This member is an extension of the World Wide 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

Show:
© 2018 Microsoft