XML DOM - NamedNodeMapObject


The NamedNodeMap object represents an unordered list of nodes.


NamedNodeMap Object

Nodes in a NamedNodeMap can be accessed by their names.

NamedNodeMap will self-update. If an element is deleted or added in the node list or XML document, the list will be automatically updated.

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

NamedNodeMap Object Properties

Property Description
length Returns the number of nodes in the list.

NamedNodeMap Object Methods

Methods Description
getNamedItem() Returns the specified node (by name).
getNamedItemNS() Returns the specified node (by name and namespace).
item() Returns the node at the specified index.
removeNamedItem() Removes the specified node (by name).
removeNamedItemNS() Removes the specified node (by name and namespace).
setNamedItem() Sets the specified node (by name).
setNamedItemNS() Sets the specified node (by name and namespace).

other extensions