Java Mailing List Archive

Home » JDOM Projects »

[jdom-interest] JDOM output buffering question

Gamble, Wesley (WG10)


Replies: Find Java Web Hosting

Author LoginPost Reply



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,


To control your jdom-interest membership:
©2008 - Jax Systems, LLC, U.S.A.