XML DOM NodeList Object

The NodeList object represents an ordered list of nodes.

NodeList Object

We can access nodes in the node list by their index number in the list (starting from index 0).

The node list can maintain its own updates. If a node list or an element in the XML document is deleted or added, the list will also be automatically updated.

Note:The order in which nodes are returned in the node list is the same as the order in which they are specified in XML.

Properties of NodeList Object

Property Description
length Return the number of nodes in the node list.

Methods of NodeList Object

Method Description
item() Return the node at the specified index in the node list.