Skip to Content.
Sympa Menu

xom-interest - Re: [XOM-interest] XOM to/from JDOM? XOM to/from saxon?

xom-interest AT lists.ibiblio.org

Subject: XOM API for Processing XML with Java

List archive

Chronological Thread  
  • From: Wolfgang Hoschek <whoschek AT lbl.gov>
  • To: xom-interest AT lists.ibiblio.org
  • Subject: Re: [XOM-interest] XOM to/from JDOM? XOM to/from saxon?
  • Date: Fri, 18 Jul 2003 13:42:46 -0700

> Elliotte Rusty Harold wrote:
>
>>> Does anyone have sample code to convert XOM <--> JDOM, and likewise XOM <--> Saxon?
>>> I need this to use some of the functionality XOM does not (yet) provide.
>>
>>
>>
>> Given that XOM and JDOM are currently at about equal states of development, I don't see a lot of need to go from JDOM to XOM and vice versa. Pick one or the other; or just stream the XML as text out using a Serializer/Outputter.
>
>
> Actually I converted using DOM as intermediary format, but would have liked to go there directly without the runtime overhead this involves.
>
> What I'm really trying to do (and haven't figured out yet) is how to validate a XOM document (already in memory) against an XML schema (also in memory or in a file in some arbitrary path on local disc. JDOM or dom4j might help out here.
>
> Given that we have so many XML tree object models for Java, it would be nice if all were "good citizens" and make it easy to go from model A to fellow model B. BTW, pushing a XOM document into SAX so other tools in turn can pick it up from SAX would fit in here, too. Just suggestions...
>
>> Since the JDOM API is, if anything, less stable than XOM's at this point in time, I don't want to commit to supporting anything based on that. (Beta 9 of JDOM just made a huge change that broke everything. Bleah. Though a lot of the changes that were made like the ParentNode interface make JDOM a lot more XOM like. And in the past when ever I've predicted when JDOM is likely to be finished, I've been off by years.)
>
>
> XOM is very good
>
>> What do you need to do with Saxon? Saxon is bundled with XOM, and is the engine behind the nu.xom.xslt package. Hmm, I'm not sure how easy it is to swap in other TrAX compliant engines. I should check that out. However, it should be possible to use Saxon via XSLTransform. If you want to do more with Saxon than that, you'll soon discover that the API isn't really intended to be used. Michael Kay told me as much when I started asking him questions about it for Processing XML with Java. If XPath is what you want, look at Jaxen instead.
>
>
>
> See my other mail on using the new saxon 7.6.5 XQuery API.
>
> Wolfgang.
>





Archive powered by MHonArc 2.6.24.

Top of Page