Class NodeList

NodeList

public class NodeList

Class representing the DOM NodeList interface


Field Summary
private  int $length
          The number of nodes in this list.
DOM-Level 1
private  array $nodes
          Contains all items of tbe NodeList.
 
Constructor Summary
NodeList()
           
 
Method Summary
 int getLength()
          Returns the number of nodes in the list.
DOM-Level 1
private  void insertNode(var $node, var $index)
          Insert a Node.
 Node item(var $index)
          Returns the indexth item in this list.
DOM-Level 1
private  void removeNode(var $index)
          Removes a Node.
private  void replaceNode(var $node, var $index)
          Replaces the indexth node with $node.
 

Field Detail

$nodes

private array $nodes
Contains all items of tbe NodeList.

$length

private int $length
The number of nodes in this list.
DOM-Level 1
Constructor Detail

NodeList

public NodeList()
Method Detail

getLength

public int getLength()
Returns the number of nodes in the list.
DOM-Level 1

item

public Node item(var $index)
Returns the indexth item in this list.
DOM-Level 1
Parameters:
$index - int

insertNode

private void insertNode(var $node,
                        var $index)
Insert a Node.
Parameters:
$node - Node
$index - int
$node - is passed by reference
$index - Default Value: -1

removeNode

private void removeNode(var $index)
Removes a Node.
Parameters:
$index - int

replaceNode

private void replaceNode(var $node,
                         var $index)
Replaces the indexth node with $node.
Parameters:
$node - Node
$index - int
$node - is passed by reference