This week's book giveaway is in the Jython/Python forum.
We're giving away four copies of Murach's Python Programming and have Michael Urban and Joel Murach on-line!
See this thread for details.
Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Parse Dom - java.lang.OutOfMemoryError  RSS feed

 
Per Lovdinger
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
When parsing a big xml-document using DOM I get
a OutOfMemoryError.
I'm using apache.xerces as parser.
I read that a "deferred DOM" might solve the problem.
What is the syntax in xerces to use a "deferred DOM" when I parse ?
..thanks in advance Per
 
Donny Wi
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sorry, I can't answer your questions.. but I might have a work-around to your problem.
I believe that DOM parser will try to put everything inside the memory when it is parsing an XML file, but SAX parser will parse the file while it is reading the XML file. So, you might want to look at SAX parser.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!