• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Parse XML File Using Java

 
Mahendra Chowdary
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi ,

May i know how we can extract data from xml file into a java collection .

Thanks
Mahendra
 
Soumyajit Hazra
Ranch Hand
Posts: 136
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can use XML parsing by Java link as a reference.
 
Mahendra Chowdary
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for the response
 
Alex Hurtt
Ranch Hand
Posts: 98
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That is a good article for starters but it doesn't seem to touch on the newer Streaming API for XML Parsing which is part of the Java 6 API in the javax.xml.stream.* packages and offers another alternative to SAX and DOM. It offers the speed of SAX parsing with the manipulation capabilities of DOM but without DOM's huge memory footprint. Just Google for 'Java streaming xml parsing api' or something and I'm sure you can find multiple tutorials for it.
 
Nate Lockwood
Ranch Hand
Posts: 83
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This is an old thread but now to access the link above it is required to enter a drawing which at the least requires submission of a valid email address. I didn't do that.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic