[jdom-interest] JDOM w/ *long* streams

Christophe D. Laprun chris.laprun at nist.gov
Tue Aug 8 15:56:41 PDT 2000


Jason Hunter wrote:
> 
> > Okay, thanks!  The custom builder sounds very interesting...would
> > implementing that basically consist of slapping a DOMBuilder interface
> > over lazy SAX parsing?  Having a DOM or JDOM tree available would save
> > me *loads* of time.
> 
> I can describe how I think the special builder would work, but first I
> need to understand the requirements.  What do you plan on doing with the
> document exactly?  What features are you looking for that SAX doesn't
> provide (writing, manipulating, etc)?  Are you OK with representing the
> full document in memory but just want access to it before you've
> retrieved the full stream?

Well, I'd be interested in benefiting from your insight too. The
application I am working on will require parsing potentially large XML
files and I would appreciate being able to build the object structure
gradually like only the top level elements and go deeper only when
needed.

Related question (?):

What happens if you access a Document object defined as the
DefaultHandler (just as in SAXBuilder.build) while parsing the XML
InputSource ? Is it possible to access elements before having retrieved
the full stream ? 
Also, forgive me for my being quite a newbie here, but does
SAXBuilder.build currently build the whole tree in memory or are there
some lazy instanciation mechanisms ?

Thanks,

Chris

-- 
Christophe Laprun    [Ingenieur ISIMA, France / Guest researcher @NIST]
web: http://www.nist.gov/speech/staff/laprunch.htm
email: chris.laprun at nist.gov
phone: (301) 975 3191             fax: (301) 670 0939
--
The universe seems neither benign nor hostile, merely indifferent -
Sagan



More information about the jdom-interest mailing list