Skip to Content.
Sympa Menu

xom-interest - [XOM-interest] Builder as ContentHandler

xom-interest AT lists.ibiblio.org

Subject: XOM API for Processing XML with Java

List archive

Chronological Thread  
  • From: "Michael Kay" <mike AT saxonica.com>
  • To: "'XOM'" <xom-interest AT lists.ibiblio.org>
  • Subject: [XOM-interest] Builder as ContentHandler
  • Date: Fri, 21 Mar 2008 11:51:27 -0000

Is there any way of building a XOM document from a stream of SAX events?
That is, something that implements ContentHandler, is called to receive the
SAX events, and returns the document node?

The code all seems to be there in XOMHandler, but it's not exposed. It's
only available via the Builder, which is only prepared to take input from a
SAX parser, not from any other source of SAX events. Emulating a parser
doesn't solve the problem because I don't want to have to drive the whole
thing by invoking a builder.build() method.

I can of course copy the code in XOMHandler but copy/paste is never the best
way of reusing code (and anyway, I'd rather not complicate my licensing even
further by adding LGPL code into the mix).

I'm asking on behalf of a Saxon user who wants to pipe the result of a Saxon
transformation into a XOM builder.

Michael Kay
http://www.saxonica.com/





Archive powered by MHonArc 2.6.24.

Top of Page