DOCUMENTS 5 - PortalScripting API
|
A DOMNamedNodeMap is a kind of index for a set of DOMNodes, in which each node has got a unique name. More...
Public Member Functions | |
DOMNode | getNamedItem (String name) |
Get a node from the map by its unique name. More... | |
DOMNode | item (Integer index) |
Get the a node from the map at a certain position. More... | |
DOMNode | removeNamedItem (String name) |
Remove a node from the map. More... | |
DOMNode | setNamedItem (DOMNode arg) |
Add a node to the map or replace an existing one. More... | |
Public Attributes | |
Integer | length |
The number of nodes in the map. More... | |
A DOMNamedNodeMap is a kind of index for a set of DOMNodes, in which each node has got a unique name.
The attributes of a DOMElement are organized in a DOMNamedNodeMap. See DOMElement.attributes. The attached nodes can be accessed either by the name or by an integer index. When using an index, the output order of the nodes is not determined. Objects of this class cannot be created directly.
Remarks about W3C conformity
The class covers the NamedNodeMap interface of DOM level 1. The underlying native library already supports at least level 2.
DOMNode DOMNamedNodeMap::getNamedItem | ( | String | name | ) |
Get a node from the map by its unique name.
name | The name. |
null
, if no node with the name is in the map. DOMNode DOMNamedNodeMap::item | ( | Integer | index | ) |
Get the a node from the map at a certain position.
This is useful only to iterate over all nodes in the map.
index | the zero based index of the element. |
null
. DOMNode DOMNamedNodeMap::removeNamedItem | ( | String | name | ) |
Remove a node from the map.
name | The unique node name. |
DOMException |
Add a node to the map or replace an existing one.
arg | The node to add. The name for indexing is the value of the attribute DOMNode.nodeName, |
null
. DOMException |
Integer DOMNamedNodeMap::length |
The number of nodes in the map.
This property is readonly.