DOM - NamedNodeMap Object
The NamedNodeMap object is used to represent collections of nodes that can be accessed by name.
The following table lists the Property of the NamedNodeMap Object.
|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.|
The following table lists the methods of the NamedNodeMap object.
|S.No.||Methods & Description|
Retrieves the node specified by name.
Retrieves a node specified by local name and namespace URI.
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.
Removes a node specified by name.
Removes a node specified by local name and namespace URI.
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.
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.