Win a copy of Learn Spring Security (video course) this week in the Spring forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Reading XML In Form Of Key-Value Pair

 
Tanzy Akhtar
Ranch Hand
Posts: 110
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Rob Spoor
Sheriff
Pie
Posts: 20492
54
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can try XMLEventReader or XMLStreamReader. Here's how you can get hold of them:
 
Tanzy Akhtar
Ranch Hand
Posts: 110
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Rob for giving such a nice idea.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic