The NamedNodeMap object represents the collection of nodes that can be accessed by name.
NamedNodeMap Object Attributes
|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.|
NamedNodeMap Object Methods
|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.
Feel free to ask your questions where necessary and we will attend to them as soon as possible. If this tutorial was helpful to you, you can use the share button to share this tutorial.
Follow us on our various social media platforms to stay updated with our latest tutorials. You can also subscribe to our newsletter in order to get our tutorials delivered directly to your emails.
Thanks for reading and bye for now.