NamedNodeMap

public interface NamedNodeMap

Objects implementing the NamedNodeMap interface are used to represent collections of nodes that can be accessed by name. Note that NamedNodeMap does not inherit from NodeList; NamedNodeMaps are not maintained in any particular order. Objects contained in an object implementing NamedNodeMap may also be accessed by an ordinal index, but this is simply to allow convenient enumeration of the contents of a NamedNodeMap, and does not imply that the DOM specifies an order to these Nodes.

NamedNodeMap objects in the DOM are live.

See also the Document Object Model (DOM) Level 3 Core Specification.

Public Method Summary

abstract int
getLength()
The number of nodes in this map.
abstract Node
getNamedItem(String name)
Retrieves a node specified by name.
abstract Node
getNamedItemNS(String namespaceURI, String localName)
Retrieves a node specified by local name and namespace URI.
abstract Node
item(int index)
Returns the indexth item in the map.
abstract Node
removeNamedItem(String name)
Removes a node specified by name.
abstract Node
removeNamedItemNS(String namespaceURI, String localName)
Removes a node specified by local name and namespace URI.
abstract Node
setNamedItem(Node arg)
Adds a node using its nodeName attribute.
abstract Node
setNamedItemNS(Node arg)
Adds a node using its namespaceURI and localName.