XML DOM tutoria...login
XML DOM tutorial
author:php.cn  update time:2022-04-13 15:27:56

DOM NodeList


XML DOM - NodeList Object


The NodeList object represents an ordered list of nodes.


NodeList object

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

The node list can keep itself updated. If an element is deleted or added to the node list or XML document, 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

PropertiesDescription
lengthReturn the number of nodes in the node list.

NodeList Object Method

MethodDescription
item()Returns the node with the specified index number in the node list.

php.cn