XML DOM - NamedNodeMap object

NamedNodeMap object represents an unordered list of nodes.

NamedNodeMap object

We can access the nodes in NamedNodeMap by node name.

NamedNodeMap can maintain its own updates. If a node list or an element in the XML document is deleted or added, the nodes will also be automatically updated.

Note:Note: Nodes in a specified node map are not returned in any order.

IE: Internet Explorer: F: Firefox: O: Opera: W3C: World Wide Web Consortium (Internet standard)

Attributes of NamedNodeMap object

Attribute Description IE F O W3C
length Can return the number of nodes in the list 5 1 9 Yes

Methods of NamedNodeMap object

Method Description IE F O W3C
getNamedItem() Can return the specified node (by name) 5 1 9 Yes
getNamedItemNS() Can return the specified node (by name and namespace)     9 Yes
item() Can return the node at the specified index 5 1 9 Yes
removeNamedItem() Can delete the specified node (by name) 6 1 9 Yes
removeNamedItemNS() Can delete the specified node (by name and namespace)     9 Yes
setNamedItem() Set the specified node (by name)     9 Yes
setNamedItemNS() Set the specified node (by name and namespace)     9 Yes