Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Best Parser for extracting data from XML.

 
Sakthi Ramasamy
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have very large XMLs which has huge chunk of data. Which parser is best to use for processing and retrieval of the data? I tried with DOM but it is throwing Heap Memory Exception. The XML Files are more than 8 MB. Is Castor API a better one to try out?
 
Ulf Dittmer
Rancher
Posts: 42968
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Take a look at SAX - it uses less memory than any of the DOM-like APIs.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic