File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes XML and Related Technologies and the fly likes Parse Dom - java.lang.OutOfMemoryError Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "Parse Dom - java.lang.OutOfMemoryError" Watch "Parse Dom - java.lang.OutOfMemoryError" New topic
Author

Parse Dom - java.lang.OutOfMemoryError

Per Lovdinger
Ranch Hand

Joined: Jun 11, 2001
Posts: 35
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

Joined: Jan 24, 2002
Posts: 13
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.


Donny Widjaja
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Parse Dom - java.lang.OutOfMemoryError
 
Similar Threads
DocumentBuilder parse file is null
my attribute value is coming in html tag how to parse that value in java
Parsing a DOM object
Convert String to XML, then search for text
javax/servlet/jsp/tagext/JspIdConsumer exception in JSF Richfaces