Navigating the Named Node Map

MSXML 5.0 SDK

Microsoft XML Core Services (MSXML) 5.0 for Microsoft Office - DOM Developer's Guide

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 getNamedItem method takes the name of the desired node as a parameter.

    The following code retrieves the value of the ID attribute on the <elem1> element and assigns that value to the variable idValue.

    idValue = elem1.attributes.getNamedItem("ID").nodeValue

  • getQualifiedItem method

    The getQualifiedItem method 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)