baseName Property
Returns the base name for the name qualified with the namespace.
[Script]
Script Syntax
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.4.0");
var MyStr;
xmlDoc.async = false;
xmlDoc.load("books.xml");
MyStr = xmlDoc.documentElement.childNodes.item(1).baseName;
alert(MyStr);
[Visual Basic]
Visual Basic Syntax
strValue = oXMLDOMNode.baseName
Example
The following Microsoft® Visual Basic® example assigns the value of a node's baseName property to a string, and then displays it.
Dim xmlDoc As New Msxml2.DOMDocument40
Dim MyStr As String
xmlDoc.async = False
xmlDoc.Load ("books.xml")
MyStr = xmlDoc.documentElement.childNodes.Item(1).baseName
MsgBox MyStr
[C/C++]
C/C++ Syntax
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 nameString is Null.
Remarks
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 Worldwide Web Consortium (W3C) Document Object Model (DOM).
To view reference information for Visual Basic, C/C++, or Script only, click the Language Filter button
in the upper-left corner of the page.
See Also
Applies to: IXMLDOMAttribute | IXMLDOMCDATASection | IXMLDOMCharacterData | IXMLDOMComment | DOMDocument | IXMLDOMDocumentFragment | IXMLDOMDocumentType | IXMLDOMElement | IXMLDOMEntity | IXMLDOMEntityReference | IXMLDOMNode | IXMLDOMNotation | IXMLDOMProcessingInstruction | IXMLDOMText