aspose file tools*
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
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: 12823
    
    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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: how to get specific root, element and node?