• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

how to get specific root, element and node?

 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator


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


please kindly help
 
Ranch Hand
Posts: 214
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Author and all-around good cowpoke
Posts: 13078
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Harold's free on-line book is loaded with examples. A bit old but still perfectly usable.

Bill
 
Wayne Wong Qi Yuan
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Just the other day, I was thinking ... about this tiny ad:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic