Skip to Content.
Sympa Menu

xom-interest - Re: [XOM-interest] StaX/DOM/SAX-to-XOM bridge

xom-interest AT lists.ibiblio.org

Subject: XOM API for Processing XML with Java

List archive

Chronological Thread  
  • From: Dmitry Katsubo <dma_k AT mail.ru>
  • To: XOM API for Processing XML with Java <xom-interest AT lists.ibiblio.org>
  • Subject: Re: [XOM-interest] StaX/DOM/SAX-to-XOM bridge
  • Date: Wed, 15 Sep 2010 12:41:46 +0200

Hello Tatu! Hello Michael!

True, that one can take DOMWrappingWriter as a basis for
XOMXMLStreamWriter. I am not sure I will implement it 100% correct and
optimal when I am looking at XOMHandler implementation.

Michael, I suppose you refer net.sf.saxon.pull.StaxBridge.
Unfortunately, I have no XMLStreamReader in my hands...

Anyway, having in a better integration with other APIs in both
directions is a plus for the library, I think. All APIs became mature
since 2005, but really no significant improvements have been made since
then. Are there any chances it will happen for XOM?

On 14.09.2010 19:30, Michael Kay wrote:
> 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 +-

--
With best regards,
Dmitry




Archive powered by MHonArc 2.6.24.

Top of Page