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

Daniel L. Rall dlr at finemaltcoding.com
Tue Aug 8 13:54:38 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?

The require/impl is as follows:
Given a URL, read its (hopefully :) XML content via URL.openStream(),
buffering content using a BufferedInputStream (if needed).  Pipe this
stream through a XML parser, validate the XML document without having
the entire stream or document DOM tree in memory at once, then start
reading records (perhaps parsing/formatting some of the node data),
storing records in an SQL database, supporting 10+ MB streams.  SAX
probably provides all the functionality that I need, but I thought that
JDOM would provide a higher level interface--already defined--for
accessing the record data.
-- 

Daniel Rall <dlr at finemaltcoding.com>



More information about the jdom-interest mailing list