Navigating the Named Node Map
As with a node list, you can access members of the named node map by index using the item method. You can also access the members of a named node map name by using the following methods.
- getNamedItem method
The
getNamedItemmethod takes the name of the desired node as a parameter.The following code retrieves the value of the
IDattribute on the<elem1>element and assigns that value to the variableidValue.idValue = elem1.attributes.getNamedItem("ID").nodeValue - getQualifiedItem method
The
getQualifiedItemmethod takes the name and namespace URI of the desired node.
Each method returns an IXMLDOMNode object.
Like the IXMLDOMNodeList, IXMLDOMNamedNodeMap exposes the nextNode property.
See Also
item Method (IXMLDOMNamedNodeMap)
