Skip to content

XML DOM: Node List

Understand how the NodeList object in XML DOM works, including its dynamic updates, ordered node access, and key properties like length and methods like item().

The NodeList object represents an ordered list of nodes.

The items in the NodeList are accessible via an index, starting from 0.

The node list keeps itself up-to-date. If an element is deleted or added, in the node list or the XML document, the list is automatically updated.

Properties

Property Description
length Returns the number of nodes in a node list

Methods

Method Description
item() Returns the node at the specified index in a node list
Navigation