A named node map represents unordered collections of nodes that can be accessed by name. The attributes of an element is an example of a named node map.
get-named-item node-map name
The get-named-item method retrieves a node specified by name. It takes two arguments: The map, and the name of the node to retrieve. It returns NIL if no match was found.
get-named-item-ns node-map name
Retrieves a node specified by local name and namespace URI.
item node-map index
The item method returns the nth item in the map, or NIL if the index is greater or equal to the number of nodes in the map. The method takes two arguments: A node map, and a numerical index into the map.
length node-map
The length attribute returns the number of nodes in the map.
remove-named-item node-map name
The remove-named-item method removes a node specified by name. The method takes two arguments: the map, and the name of the node to remove.
remove-named-item-ns node-map namespace-uri local-name
Removes a node specified by local name and namespace.
set-named-item node-map node
The set-named-item method adds a node using its nodename attribute. It takes two arguments: The map, and the node to store in the map. If the new node replaces an existing node with the same name, the previously existing node is returned.
set-named-item-ns node-map node
Adds a node using its nodename attribute. It takes two arguments: The map, and the node to store in the map. If the new node replaces an existing node with the same name, the previously existing node is returned.