XML DOM-Document-Objekt

The NamedNodeMap object represents an unordered list of nodes.

NamedNodeMap object

We can access the nodes in the NamedNodeMap by node name.

The NamedNodeMap can keep 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.

Attention:Note: In the naming node mapping, nodes are not returned in any specific order.

Attributes of NamedNodeMap object

Attribute Description
length Return the number of nodes in the list.

Methods of NamedNodeMap object

Method Description
getNamedItem() Return the node with a specific name.
getNamedItemNS() Return the node with a specific name and namespace.
item() Return the node at the specified index.
removeNamedItem() Delete the node with a specific name.
removeNamedItemNS() Delete the node with a specific name and namespace.
setNamedItem() Set the specified node (by name).
setNamedItemNS() setNamedItemNS()