Returns the node at the specified index (0-based). |
Signature: &item($index) |
Parameters:
int index - The index of the DOMIT_Node to be returned.
|
Returns:
DOMIT_Node - The DOMIT_Node at the index specified, or null if nothing is found at that location.
|
Example:
The third node in the node list is returned: $thirdNode =& myNodeList->item(2); |
Returns the number of nodes in the node map. |
Signature: getLength() |
Returns:
int - The number of nodes in the node map.
|
Example:
The number of nodes in the node map are returned: $numNodes = myNodeMap->getLength(); |
Gets the node with the specified nodeName from the list, or returns null. |
Signature: &getNamedItem($name) |
Parameters:
String node - The name of the node to be retrieved.
|
Returns:
DOMIT_Node - The node to be returned.
|
Example:
A node named "param" is returned from $myNodeMap: $returnedNode =& myNodeMap->getNamedItem("param"); |
Adds the specified node to the node map, using its nodeName as key. Overwrites an existing named item. |
Signature: &setNamedItem(&$arg) |
Parameters:
DOMIT_Node arg - The node to be added.
|
Returns:
DOMIT_Node - Null, or the node that was overwritten if this is the case.
|
Example:
A node is added to $myNodeMap: myNodeMap->setNamedItem($aNode); |
Removes the node with the specified nodeName from the node map. |
Signature: &removeNamedItem($name) |
Parameters:
String name - The nodeName of the node to be removed.
|
Returns:
DOMIT_Node - The node that was just removed, or null if it wasn't found.
|
Example:
A node named "param" is removed from $myNodeMap: $returnedNode =& myNodeMap->removeNamedItem("param"); |