DOM Object: NamedNodeMap
|
Properties/Methods |
Functional Description |
Data |
Test Case |
|---|---|---|---|
| length | The number of nodes in the map. The range of valid child node incies is 0 to length-1 inclusive. | 2 | cmap001.html |
| getNamedItem(name) | Retrieves a node specified by name. Returns a Node (of any type) with the specified name, or null if the specified name did not identify and node in the map. | bgcolor | cmap002.html |
| setNamedItem(arg) | Adds a node using its nodeName attribute. If the new Node replaces an existintg node with the same name, the preivously existing Node is returned, otherwise null is returned. | text | cmap003.html |
| removeNamedItem(name) | Removes a node specified by name. If the removed node is an Attr with a default value it is immediately replaced. Returns the node removed from the map or null if no node with such a name exists. | bgcolor | cmap004.html |
| item(index) | Returns the indexth item in the map. If index is greater than or equal to the number of nodes in the map, this returns null. | text | cmap005.html |