xom-interest AT lists.ibiblio.org
Subject: XOM API for Processing XML with Java
List archive
- From: "Galt, Stuart A" <stuart.a.galt AT boeing.com>
- To: <xom-interest AT lists.ibiblio.org>
- Subject: [XOM-interest] Serialize a bit at a time?
- Date: Tue, 30 Sep 2003 10:53:31 -0700
Hello,
I am new to the list and if this is an old subject please forgive
me and please point me to an archive.
I am trying to create large XML files. My hope was to create a DOM
(or XOM) or some tree like structure and "print it out at the end".
I now realize that this is not possible. So, is it possible (or
even recommended) to serialize part of the node tree?
My document is of the form:
<document>
<frontmatter>
[ basic front matter stuff title, author, etc]
</frontmatter>
<pages>
<page>
<number>1</number>
[lots of page info here could be up to 1000 nodes]
</page>
<page>
<number>2</number>
[lots of page info here could be up to 1000 nodes]
</page>
...
<page>
<number>3000</number>
...
</page>
</pages>
</document>
I don't generate this data in a linear way so converting it to
just dump to a stream would be hard. But I would like be able to
tell the write method to only traverse the node tree until it gets
to a specified point. Then I could do something like:
write from the document element to the pages element;
for each page {
build xom for that page;
write it out;
release the page;
}
write out the "rest of the tree";
Am I crazy? What is the normal way of doing stuff like this?
Thank you for your time.
Stuart Galt.
--
Stuart Galt
SGML Resource Group
stuart.a.galt AT boeing.com
(206) 544-9925
- [XOM-interest] Serialize a bit at a time?, Galt, Stuart A, 09/30/2003
Archive powered by MHonArc 2.6.24.