-  
       
public interface NameListNameList接口提供了名称和命名空间值(可以是空值)的并行线对的有序集合的抽象,而不定义或约束此集合的实现方式。NameList中的项目可通过整数索引访问,从0开始。- 从以下版本开始:
 - 1.5,DOM Level 3
 
 
-  
        
       
-  
             
方法摘要
所有方法 实例方法 抽象方法 变量和类型 方法 描述 booleancontains(String str)测试名称是否为此NameList一部分。booleancontainsNS(String namespaceURI, String name)测试对namespaceURI / name是否属于此NameList。intgetLength()列表中的对(名称和namespaceURI)的数量。StringgetName(int index)返回集合中的index名称项。StringgetNamespaceURI(int index)返回集合中的indexnamespaceURI项。 
 -  
             
 
-  
        
       
-  
             
方法详细信息
-  
getName
String getName(int index)
返回集合中的index名称项。- 参数
 -  
              
index- 集合索引。 - 结果
 -  
              
index位置的NameList,如果指定索引没有名称或索引超出范围,null。 
 
-  
getNamespaceURI
String getNamespaceURI(int index)
返回集合中的indexnamespaceURI项。- 参数
 -  
              
index- 索引到集合中。 - 结果
 - 
               在该命名空间URI 
              
index在个位置NameList,或null如果不存在用于指定的索引,如果索引超出范围没有名字。 
 
-  
getLength
int getLength()
列表中的对(名称和namespaceURI)的数量。 有效子节点索引的范围是0到length-1含)。 
-  
contains
boolean contains(String str)
测试名称是否属于此NameList一部分。- 参数
 -  
              
str- 要查找的名称。 - 结果
 -  
              
true如果找到了名字,另有false。 
 
 -  
 
 -