XML DOM - NamedNodeMap Object
The NamedNodeMap object represents an unordered collection of nodes.
NamedNodeMap Object
Nodes in a NamedNodeMap can be accessed by their names.
The NamedNodeMap will update itself. If an element is removed or added to the node list or XML document, the list will automatically update.
Note: Nodes in the named node map are not returned in any particular order.
NamedNodeMap Object Properties
| Property | Description |
|---|---|
| length | Returns the number of nodes in the list. |
NamedNodeMap Object Methods
| Method | 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). |