public interface NodeList
| org.w3c.dom.NodeList |
NodeList接口提供了一个有序的节点集合的抽象,而没有定义或约束如何实现这个集合。 NodeList DOM中的对象是活的。
NodeList中的项目可通过从0开始的整数索引访问。
另请参阅 Document Object Model (DOM) Level 3 Core Specification 。
公共方法(Public methods) |
|
|---|---|
abstract int |
getLength() 列表中的节点数量。 |
abstract Node |
item(int index) 返回 |
Node item (int index)
返回index第index个项目。 如果index大于或等于列表中的节点数,则返回null 。
| 参数(Parameters) | |
|---|---|
index |
int: Index into the collection. |
| 返回(Returns) | |
|---|---|
Node |
The node at the indexth position in the NodeList, or null if that is not a valid index. |