Skip to Content.
Sympa Menu

xom-interest - Re: [XOM-interest] How to write huge XML document ?

xom-interest AT lists.ibiblio.org

Subject: XOM API for Processing XML with Java

List archive

Chronological Thread  
  • From: Elliotte Harold <elharo AT metalab.unc.edu>
  • To: Jiøí Vacek <ingjv AT hotmail.com>
  • Cc: xom-interest AT lists.ibiblio.org
  • Subject: Re: [XOM-interest] How to write huge XML document ?
  • Date: Tue, 21 Sep 2004 05:26:50 -0400

Jiøí Vacek wrote:

Hi for all !

From XOM giude I know how to read and process huge document. But how to

create ?
Target doc wiil be bigger than memory. Is SAX only way ?


SAX is read-only so that doesn't really help. The nu.xom.Serializer class needs the entire document in memory, so that doesn't really help either. There are SAX-based programs, not part of the core API, that can help. David Megginson wrote one called XMLWriter, a slightly modified version of which is hiding in the nu.xom.tests package if you look. I'm afraid I don't have anything better than that to offer you at this moment.

A streaming serializer based on a NodeFactory shouldn't be too hard to write though, and might make a nice example for the samples package. If I get the time, I'll think about it.


--
Elliotte Rusty Harold
elharo AT metalab.unc.edu




Archive powered by MHonArc 2.6.24.

Top of Page