Latest web development tutorials

XML DOM - NodeList objects

NodeList object represents an ordered list of nodes.


NodeList objects

Node list node by its corresponding index number (counting from 0) for a visit.

Node list keeps itself updated. If the node list or the XML document, an element is deleted or added, the list will be automatically updated.

Note: In a list of nodes, the order of the nodes to be returned with the order they are specified in the same XML document.

NodeList object properties

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

NodeList object methods

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