[jdom-interest] XMLFilter/SAXHandler question...
Jon Baer
jonbaer at digitalanywhere.com
Tue Jul 31 17:01:46 PDT 2001
Im trying to figure out how to handle large amounts of XML being passed
by an editor I want to create. The problem is that with say < ~2mb of
data its OK but @ > ~2mb the SAXBuilder.build() grows to an OutOfMemory
exception, so what I want to try is to create an event handling in the
SAXHandler itself and use a JDOM Element (structure/object).
Obviously when dealing with large files there are a few facts which are
unknown to the builder, like exactly how much data it is going to need
to handle. So Im also thinking of "splitting" the Document based on the
size of the file and using a temporary root element array (sorry if I
didnt make sense there).
There are some different approaches but the basic gist that I want to
use JDOM for this editor for XML files but I don't want to say to the
user that building a file with over X amount of elements might cause OOM
errors, adjust the VM stack size.
Would it make sense to go through the effort of creating such a
"SmartBuilder" or is there some other way?
- Jon
More information about the jdom-interest
mailing list