Java Mailing List Archive

http://www.junlu.com/

Home » Home (12/2007) » JDOM User »

Re: [jdom-interest] Memory problems

Bradley S. Huffman

2003-12-29


"Pramodh Peddi" writes:

> I am using JDOM for XML processing. I use SAXBuilder. I am having memory =
> problems when it deals with huge documents (like 10MB), even though it =
> is using SAXBuidler. It throws OutOfMemoryError when I try to build a =
> 8MB document.
> I assume it does not keep the whole tree in memory if I use SAXBuilder. =
> Does it?

Yes, SAXBuilder takes SAX events from the SAX parser and builds a JDOM tree
to represent the *whole* document. If you only need parts of the document
take a look at ElementScanner in jdom-contrib.

Brad
_______________________________________________
To control your jdom-interest membership:
http://lists.denveronline.net/mailman/options/jdom-interest/youraddr@(protected)


©2008 junlu.com - Jax Systems, LLC, U.S.A.