aspose file tools*
The moose likes EJB and other Java EE Technologies and the fly likes XML Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "XML" Watch "XML" New topic
Author

XML

Mabobotsane Mogo
Greenhorn

Joined: Oct 12, 2005
Posts: 4
<Telelist>
<tele isValid = "true" 888666</tele>
<tele isValid = "true" 888777</tele>
</Telelist>

//xmldoc XML doc as define above

NodeList nodelist = null;
nodelist= xmldoc.getElementsByTagName("tele");

The problem I can't read the <tele> node
xmldoc.getElementsByTagName("tele"); return nullPointer

What method I use to read XML
Yuan Ye
Ranch Hand

Joined: Mar 05, 2003
Posts: 172
Did you forget the ">" for tele?

<Telelist>
<tele isValid = "true"> 888666</tele>
<tele isValid = "true"> 888777</tele>
</Telelist>
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: XML