Coding With Fun
Home Docker Django Node.js Articles Python pip guide FAQ Policy

XML DOM - NodeList object


May 27, 2021 XML DOM


Table of contents


XML DOM - NodeList object


The NodeList object represents an ordered list of nodes.

There is a length property and an item() method in the NodeList object.


NodeList object

Nodes in the node list can be accessed through their corresponding index number, which counts from 0.

The list of nodes maintains its own updates. If an element in a node list or XML document is deleted or added, the list is automatically updated.

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

NodeList object properties

属性 描述
length 返回节点列表中的节点数量。

NodeList object method

方法 描述
item() 返回节点列表中指定索引号的节点。