You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@xmlbeans.apache.org by Or...@emc.com on 2007/12/05 11:15:21 UTC
Writing big files
As I understand, the only way of writing an xml file is filling a
document object with data and then saving it.
However, if one wishes to write a big file one encounters memory related
problems.
Is there a way to write the document incrementally?
Re: Writing big files
Posted by Jacob Danner <ja...@gmail.com>.
Comments inline:
-jacobd
On Dec 5, 2007 2:15 AM, <Or...@emc.com> wrote:
> As I understand, the only way of writing an xml file is filling a
> document object with data and then saving it.
>
Any type that inherits from XmlObject has a save method, so you aren't
limited to the document object.
> However, if one wishes to write a big file one encounters memory related
> problems.
>
Have you tried just increasing the mem size for java when you run your code?
> Is there a way to write the document incrementally?
>
Not AFAIK
RE: Writing big files
Posted by Cory Virok <cv...@vmware.com>.
I am trying to do this as well!
One possible way is to use the FilterXmlObject to act as a proxy nod ein the
DOM tree. When it's save(OutputStream) method is invoked, you can pipe input
read from an external file into the output stream, close the external file,
continue writing DOM nodes to the stream...
However, no-one knows how to insert a FilterXmlObject into the XMLBeans DOM
tree. I've tried everything I can think of but there's just no good way of
getting that sucker in there!
If you figure this out... please post back to the list. There are a ton of
people interested.
cory
________________________________
From: Or_Daniel@emc.com [mailto:Or_Daniel@emc.com]
Sent: Wednesday, December 05, 2007 2:15 AM
To: user@xmlbeans.apache.org
Subject: Writing big files
As I understand, the only way of writing an xml file is filling a document
object with data and then saving it.
However, if one wishes to write a big file one encounters memory related
problems.
Is there a way to write the document incrementally?