aspose file tools*
The moose likes Java in General and the fly likes Reading XML In Form Of Key-Value Pair Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "Reading XML In Form Of Key-Value Pair" Watch "Reading XML In Form Of Key-Value Pair" New topic
Author

Reading XML In Form Of Key-Value Pair

Tanzy Akhtar
Ranch Hand

Joined: Jul 19, 2009
Posts: 110
Hi,

I have the following XML file--



I need to read every first name and last name. The one way is to achieve this to read the xml node
by node. But i think it will create some kind of performance problem when size of xml file will become large.
Please correct me if i am wrong.

Is there any other way to achieve it? I heared about XSL and Transformation. But never worked on this.
Is that goood to go? If yes, then how?


Thanks,
Tanzy.


Roll with punchers, there is always tomorrow.
Techie Blog -- http://jtanzy.blogspot.com/
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19545
    
  16

You can try XMLEventReader or XMLStreamReader. Here's how you can get hold of them:


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
Tanzy Akhtar
Ranch Hand

Joined: Jul 19, 2009
Posts: 110
Thanks Rob for giving such a nice idea.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Reading XML In Form Of Key-Value Pair
 
Similar Threads
Reading A File
How to modify XML file in Java
Real time update from database
evaluating XPath predicates - question
iBATIS Example exception