[jdom-interest] JDOM output buffering question

Gamble, Wesley (WG10) WG10 at tmw.com
Mon Jan 14 15:47:30 PST 2008


All,

 

I am looking at generating some big-a**ed XML documents, which I then
write out to a file.  I seem to be having some issue with the document
memory not being released.  

 

In order to output the entire document using an XMLOutputter, the entire
document must be resident in memory, correct?

 

What I'd like is a way to output using the XMLOutputter periodically so
that I could use a fraction of the memory required to hold the entire
document.  However, I don't believe that this is truly possible.  It
seems like if I wanted to do this, I would have to write out all of the
contents of the root element using an Outputter and then "wrap" that XML
in my root element "by hand." (meaning using string and file
manipulation to handle it.

 

I'm not talking about the buffering of the call to output an entire
document, I'm talking about using a "window" in memory to hold parts of
the document while I continuously write it to the filesystem, so that I
don't need to build the entire document in memory.

 

Hope that makes sense.

 

Thanks for any advice,

Wes

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.jdom.org/pipermail/jdom-interest/attachments/20080114/a818fc1c/attachment.htm


More information about the jdom-interest mailing list