public interface NameList
| org.w3c.dom.NameList |
NameList接口提供了对名称和名称空间值(可能为空值)的并行对的有序集合的抽象,而不定义或限制如何实现该集合。 NameList中的项目可通过从0开始的整数索引访问。
另请参阅 Document Object Model (DOM) Level 3 Core Specification 。
Public methods |
|
|---|---|
abstract boolean |
contains(String str) 测试一个名字是否属于这个 |
abstract boolean |
containsNS(String namespaceURI, String name) 测试这个pair namespaceURI / name是否为 |
abstract int |
getLength() 列表中的对(name和namespaceURI)的数量。 |
abstract String |
getName(int index) 返回 |
abstract String |
getNamespaceURI(int index) 返回 |
boolean contains (String str)
测试一个名字是否属于这个 NameList 。
| Parameters | |
|---|---|
str |
String: The name to look for. |
| Returns | |
|---|---|
boolean |
true if the name has been found, false otherwise. |
boolean containsNS (String namespaceURI, String name)
测试这个pair namespaceURI / name是否为 NameList一部分。
| Parameters | |
|---|---|
namespaceURI |
String: The namespace URI to look for. |
name |
String: The name to look for. |
| Returns | |
|---|---|
boolean |
true if the pair namespaceURI/name has been found, false otherwise. |
int getLength ()
列表中的对(name和namespaceURI)的数量。 有效子节点索引的范围是0到length-1含)。
| Returns | |
|---|---|
int |
|
String getName (int index)
返回 index第 index个名称项目。
| Parameters | |
|---|---|
index |
int: Index into the collection. |
| Returns | |
|---|---|
String |
The name at the indexth position in the NameList, or null if there is no name for the specified index or if the index is out of range. |
String getNamespaceURI (int index)
返回 index第 index个namespaceURI项目。
| Parameters | |
|---|---|
index |
int: Index into the collection. |
| Returns | |
|---|---|
String |
The namespace URI at the indexth position in the NameList, or null if there is no name for the specified index or if the index is out of range. |