xom-interest AT lists.ibiblio.org
Subject: XOM API for Processing XML with Java
List archive
- From: Dmitry Katsubo <dma_k AT mail.ru>
- To: xom-interest AT lists.ibiblio.org
- Subject: [XOM-interest] StaX/DOM/SAX-to-XOM bridge
- Date: Tue, 14 Sep 2010 17:11:49 +0200
Dear XOM users!
I want to benefit from quick StaX/DOM/SAX -to- XOM document creation,
but I was not able to locate any way to do so. Actually, my target API I
want to bind with is javax.xml.bind.Marshaller.marshal(), that accepts
javax.xml.transform.Result, org.xml.sax.ContentHandler or
javax.xml.stream.XMLStreamWriter as possible outputs.
Unfortunately, nu.xom.xslt.XOMResult is not visible, so does
nu.xom.XOMHandler. And there is no XMLStreamWriter -to- NodeFactory
bridge. More over I cannot copy XOMHandler to my package, as
Element.setActualBaseURI(), Node.isElement(), etc are not public. Does
it mean I cannot write my own ContentHandler to create XOM document?
The same concerns DOM-to-XOM converters. What I found is only XOM-to-DOM
nu.xom.converters.DOMConverter.
If somebody has ready-to-use adapters, please, share them. At the moment
I found this [1] discussion with this [2] code example, that reads from
javax.xml.stream.XMLStreamReader and creates XOM document.
I would appreciate, if something similar to following code snapshot
would be possible via core XOM:
final nu.xom.xslt.XOMResult result = new nu.xom.xslt.XOMResult(); //
default constructor that creates new NodeFactory() for me
marshaller.marshal(bean, result);
nu.xom.Document doc = result.getDocument();
Any feedback is very welcomed.
[1] https://lists.ibiblio.org/sympa/arc/xom-interest/2005-August/002563.html
[2]
https://lists.ibiblio.org/sympa/arc/xom-interest/2005-September/002617.html
--
With best regards,
Dmitry
-
[XOM-interest] StaX/DOM/SAX-to-XOM bridge,
Dmitry Katsubo, 09/14/2010
-
Re: [XOM-interest] StaX/DOM/SAX-to-XOM bridge,
Tatu Saloranta, 09/14/2010
-
Re: [XOM-interest] StaX/DOM/SAX-to-XOM bridge,
Michael Kay, 09/14/2010
- Re: [XOM-interest] StaX/DOM/SAX-to-XOM bridge, Dmitry Katsubo, 09/15/2010
-
Re: [XOM-interest] StaX/DOM/SAX-to-XOM bridge,
Michael Kay, 09/14/2010
-
Re: [XOM-interest] StaX/DOM/SAX-to-XOM bridge,
Elliotte Rusty Harold, 09/15/2010
- Re: [XOM-interest] StaX/DOM/SAX-to-XOM bridge, Dmitry Katsubo, 09/15/2010
-
Re: [XOM-interest] StaX/DOM/SAX-to-XOM bridge,
Tatu Saloranta, 09/14/2010
Archive powered by MHonArc 2.6.24.