JDOM output buffering question

"Gamble, Wesley (WG10)" <[email protected]>
Newsgroups gmane.comp.java.jdom.general
Message-ID <[email protected]>
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

_______________________________________________
To control your jdom-interest membership:
http://www.jdom.org/mailman/options/jdom-interest/[email protected]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.