This week's book giveaway is in the Jython/Python forum.
We're giving away four copies of Murach's Python Programming and have Michael Urban and Joel Murach on-line!
See this thread for details.
Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

How to Read certain data from a xml file I made? xPath?  RSS feed

 
Chrix Wu
Ranch Hand
Posts: 121
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
lets say i have following data in a config file,

i was wondering how do i read the "class" attribute from the file?

my colleague suggested me to use xPath, but how? read as an inputstream or what? or is there any existing api i can use?

do you guys have other suggestions? thanks in advance.


 
Jimmy Clark
Ranch Hand
Posts: 2187
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There are many different ways to read XML-based data using Java API and other technologies. Study the Simple API for XML (SAX) to learn how.

Good luck!
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!