Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

XML DOM – NodeList Object

XML DOM - NodeList Object


The NodeList object represents an ordered list of nodes.


NodeList object

Nodes in a node list can be accessed by their corresponding index numbers (starting from 0).

A node list keeps itself updated. If an element in the node list or XML document is deleted or added, the list is automatically updated.

**Note:** In a node list, nodes are returned in the same order as they are specified in the XML document.

NodeList Object Properties

property Description
length Returns the number of nodes in the node list.

NodeList Object Methods

Method Description
item() Returns the node with the specified index in the node list.