Logo 
Search:

Java Answers

Ask Question   UnAnswered
Home » Forum » Java       RSS Feeds
  Question Asked By: Eden Jones   on Jun 15 In Java Category.

  
Question Answered By: Ray Lawrence   on Jun 15

Depends on the size of your file. I highly recommend you SAX to parse
XML in Java

I've been building application  to read XML files, i was using JDOM
which was fine for small XML file, then when it's a huge one i had
OutOfMemory problems.

Then i changed to SAX, and i have no problems at all. It maybe a
little bit trickier to map the element, especially if it is a very big
XML file  with dupicates element names. But it's definitely worth it.

Alot more efficient than DOM, for sure.

Share: 

 

This Question has 2 more answer(s). View Complete Question Thread

 
Didn't find what you were looking for? Find more on SAX vs DOM Or get search suggestion and latest updates.


Tagged: