[XOM-interest] StaX/DOM/SAX-to-XOM bridge

Michael Kay mike at saxonica.com
Tue Sep 14 13:30:53 EDT 2010


Nice to see that Nux is back on the air - it seemed to have disappeared 
for a while (or moved to a location where it couldn't be found).

The other possibility is to go via Saxon. The code is essentially

StaxBridge stax = new StaxBridge();
stax.setXmlStreamReader(....);
XOMWriter builder = new XOMWriter();
new PullPushCopier(stax, builder).copy();
Document xom = builder.getDocument();

Michael Kay
Saxonica


On 14/09/2010 6:07 PM, Tatu Saloranta wrote:
> --- On Tue, 9/14/10, Dmitry Katsubo<dma_k at mail.ru>  wrote:
>
>> I want to benefit from quick StaX/DOM/SAX -to- XOM document
>> creation,
> One alternative would be to adapt existing DOMWrappingWriter from Woodstox (or rather its Stax2 API ref impl, under src/java/org/codehaus/stax2/ri/dom/DOMWrappingWriter.java), which implements Stax XMLStreamWriter to construct DOM document (or fragment).
> Creating equivalent for XOM should be relatively straight-forward.
>
> Also, Nux project (http://acs.lbl.gov/software/nux/) has many xom/stax integration pieces so if you haven't yet looked at it, I would suggest doing so.
>
> -+ Tatu +-
>
>
>
>
> _______________________________________________
> XOM-interest mailing list
> XOM-interest at lists.ibiblio.org
> http://lists.ibiblio.org/mailman/listinfo/xom-interest
>




More information about the XOM-interest mailing list