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: Elliotte Rusty Harold <elharo AT metalab.unc.edu>
  • To: Wolfgang Hoschek <whoschek AT lbl.gov>
  • Cc: xom-interest AT lists.ibiblio.org
  • Subject: Re: [XOM-interest] XOM to/from JDOM? XOM to/from saxon?
  • Date: Thu, 17 Jul 2003 23:22:45 -0400

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. 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.)

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.
--

Elliotte Rusty Harold
elharo AT metalab.unc.edu
Processing XML with Java (Addison-Wesley, 2002)
http://www.cafeconleche.org/books/xmljava
http://www.amazon.com/exec/obidos/ISBN%3D0201771861/cafeaulaitA




Archive powered by MHonArc 2.6.24.

Top of Page