May 27, 2021 XML DOM
The NodeList object represents an ordered list of nodes.
There is a length property and an item() method in the 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.
属性 | 描述 |
---|---|
length | 返回节点列表中的节点数量。 |
方法 | 描述 |
---|---|
item() | 返回节点列表中指定索引号的节点。 |