[XOM-interest] Builder as ContentHandler
Michael Kay
mike at saxonica.com
Fri Mar 21 07:51:27 EDT 2008
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/
More information about the XOM-interest
mailing list