NamedNodeMap in DOM Level 2 Core

The NamedNodeMap interface represents a collection of nodes that can be accessed by name.

For more information see

Instance Properties

name type description
length Number (read only)

Instance Methods

name returns description
getNamedItem(name) Node
getNamedItemNS(namespaceURI,localName) Node
item(index) Node
removeNamedItem(name) Node
removeNamedItemNS(namespaceURI,localName) Node
setNamedItem(arg) Node
setNamedItemNS(arg) Node



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.

Properties that are a NamedNodeMap

name object description
attributes Node (read only)
entities DocumentType (read only)
notations DocumentType (read only)