Microsoft XML SDK 2.6 - XML Reference

name Property (XMLDOMAttribute)

Contains the attribute name.

strValue = oXMLDOMAttribute.name

Remarks

String. The property is read-only. It returns the name of the attribute. The value is the same as the XMLDOMNode object's nodeName property.

Example

The following VBScript example creates an XMLDOMAttribute object from the first attribute of the root, and then displays the value of its name:

Dim xmlDoc
Dim root
Dim objDOMatt
Set xmlDoc = CreateObject("Msxml2.DOMDocument")
xmlDoc.async = False
xmlDoc.load("c:\books.xml")
Set root = xmlDoc.documentElement
Set objDOMatt = root.attributes.item(0)
MsgBox (objDOMatt.name)

See Also

Applies To: XMLDOMAttribute Object