GeeCON Prague 2014*
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


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>
 
GeeCON Prague 2014
 
subject: XML