Skip to main content

XML DOM: NamedNodeMap Object

The NamedNodeMap object represents an unordered list of nodes that can be accessed by their names.

The NamedNodeMap keeps itself up-to-date. If an element is deleted or added, in the node list or the XML document, the list is automatically updated.

note

In a NamedNodeMap, the nodes are not returned in any particular order.

Properties

PropertyDescription
lengthReturns the number of nodes in the list

Methods

MethodDescription
getNamedItem()Returns the node with the specific name
getNamedItemNS()Returns the node with the specific name and namespace
item()Returns the node at the specified index
removeNamedItem()Removes the node with the specific name
removeNamedItemNS()Removes the node with the specific name and namespace
setNamedItem()Sets the specified node (by name)
setNamedItemNS()Sets the specified node (by name and namespace)

Table of Contents