wood burning stoves 2.0*
The moose likes XML and Related Technologies and the fly likes how to get specific root, element and node? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "how to get specific root, element and node?" Watch "how to get specific root, element and node?" New topic
Author

how to get specific root, element and node?

Wayne Wong Qi Yuan
Greenhorn

Joined: May 30, 2012
Posts: 4


i been research quite a long time...
i cant figure out how to show this part that i want


please kindly help
D. Ogranos
Ranch Hand

Joined: Feb 02, 2009
Posts: 214
For parsing the XML, check out the API documentation for

org.w3c.dom.Document
javax.xml.parsers.DocumentBuilder
javax.xml.parsers.DocumentBuilderFactory

Then use XPath to find specific nodes in the document. See

javax.xml.xpath.XPathExpression
javax.xml.xpath.XPath
javax.xml.xpath.XPathFactory

If you have problems with any part, post again
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12761
    
    5
Harold's free on-line book is loaded with examples. A bit old but still perfectly usable.

Bill
Wayne Wong Qi Yuan
Greenhorn

Joined: May 30, 2012
Posts: 4
thank to Second Post...
is help a lot....
i can get the node that i want in xml
using xpath can get any node from different lvl of root....

share what i done
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: how to get specific root, element and node?
 
Similar Threads
square bracket in send mail
Getting the class name without the full package
How can I set bean property in JSF page?!
Regex for Reversing Last Name, First Name?
Can�t set managed bean property�.