NamedNodeMap.getNamedItem() (Method)

Given the name of a node, it can be extracted from the collection by name.

Availability:

DOM level - 1
JavaScript - 1.5
JScript - 5.0
Internet Explorer - 5.0
Netscape - 6.0
Property/method value type:Node object
JavaScript syntax:-myNamedNodeMap.getNamedItem(aName)
Argument list:aNameThe name of the node to be accessed

If a node having the specified name exists in the node map, then a reference to it will be returned. If there is no matching node, a null will be returned instead.

It isn't clear what happens if there are duplicate nodes with the same name. Some implementations may choose to return a collection of all nodes with a matching name.