KickJava   Java API By Example, From Geeks To Geeks.

Java > Java SE, EE, ME > org > w3c > dom > NodeList

org.w3c.dom
Interface NodeList

All Known Implementing Classes:
IIOMetadataNode
See Also:
Top Examples, Source Code

int getLength()
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


[1583]Loop through elements by tag and get its attributes
By Anonymous on 2005/11/04 20:23:08  Rate
Element aElement = ... //from somewhere 
  
  
 NodeList nodeList = aElement.getElementsByTagName  ( "aTag" ) ; 
 int length = nodeList.getLength  (  ) ; 
 for  ( int r = 0; r  <  length; ++r )  
     System.out.println  (   (  ( Element )  nodeList.item  ( r )  ) .getAttribute  ( "aAttr" )  ) ; 
  } 


Node item(int index)
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  

Popular Tags