permaculture playing cards*
The moose likes XML and Related Technologies and the fly likes How to Read certain data from a xml file I made?  xPath? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "How to Read certain data from a xml file I made?  xPath? " Watch "How to Read certain data from a xml file I made?  xPath? " New topic
Author

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

Chrix Wu
Ranch Hand

Joined: Nov 15, 2009
Posts: 121
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.



** SCJP 5.0 84% **
** SCWCD 1.5 76% **
Jimmy Clark
Ranch Hand

Joined: Apr 16, 2008
Posts: 2187
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!
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to Read certain data from a xml file I made? xPath?
 
Similar Threads
generic parser
Parsing XML file using Xpath in jdk1.4
use generic type as class
Setting lazy For One-to-One relation using Configuration Object
Automatic DAO code generation