
- XML DOM Basics
- XML DOM - Home
- XML DOM - Overview
- XML DOM - Model
- XML DOM - Nodes
- XML DOM - Node Tree
- XML DOM - Methods
- XML DOM - Loading
- XML DOM - Traversing
- XML DOM - Navigation
- XML DOM - Accessing
- XML DOM Operations
- XML DOM - Get Node
- XML DOM - Set Node
- XML DOM - Create Node
- XML DOM - Add Node
- XML DOM - Replace Node
- XML DOM - Remove Node
- XML DOM - Clone Node
- XML DOM Objects
- DOM - Node Object
- DOM - NodeList Object
- DOM - NamedNodeMap Object
- DOM - DOMImplementation
- DOM - DocumentType Object
- DOM - ProcessingInstruction
- DOM - Entity Object
- DOM - EntityReference Object
- DOM - Notation Object
- DOM - Element Object
- DOM - Attribute Object
- DOM - CDATASection Object
- DOM - Comment Object
- DOM - XMLHttpRequest Object
- DOM - DOMException Object
- XML DOM Useful Resources
- XML DOM - Quick Guide
- XML DOM - Useful Resources
- XML DOM - Discussion
DOM - NamedNodeMap Object
The NamedNodeMap object is used to represent collections of nodes that can be accessed by name.
Attributes
The following table lists the Property of the NamedNodeMap Object.
Attribute | Type | Description |
---|---|---|
length | unsigned long | It gives the number of nodes in this map. The range of valid child node indices is 0 to length-1 inclusive. |
Methods
The following table lists the methods of the NamedNodeMap object.
S.No. | Methods & Description |
---|---|
1 | getNamedItem () Retrieves the node specified by name. |
2 | getNamedItemNS () Retrieves a node specified by local name and namespace URI. |
3 | item () Returns the indexth item in the map. If index is greater than or equal to the number of nodes in this map, this returns null. |
4 | removeNamedItem () Removes a node specified by name. |
5 | removeNamedItemNS () Removes a node specified by local name and namespace URI. |
6 | setNamedItem () Adds a node using its nodeName attribute. If a node with that name is already present in this map, it is replaced by the new one. |
7 | setNamedItemNS () Adds a node using its namespaceURI and localName. If a node with that namespace URI and that local name is already present in this map, it is replaced by the new one. Replacing a node by itself has no effect. |