tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jason Hunter <>
Subject Re: XML parser bag of cats
Date Wed, 28 Jun 2000 22:55:52 GMT
> I am wondering if I am feeling a unique pain, or if others share it:
> The state of XML parsers is a bit of a mess, in that you have the following
> bag of cats:
> - javax.xml (JAXP 1.0.1)
> - com.sun.xml (reference implementation in JAXP 1.0.1)
> - org.w3c.dom (level 1 support shipped with JAXP 1.0.1)
> - org.w3c.dom (level 2 support shipped in Xerces)
> - org.xml.sax (level 1 support shipped with JAXP 1.0.1)
> - org.xml.sax (level 2 support shipped in Xerces)
> - org.apache.xerces (at various levels)
> The thing that's biting me is that I would like to assemble components that
> are dependent on Xerces, with its post level 1 XML parsing support, with
> components (like Tomcat) that still depend on Sun's XML parser, which
> support level 1 DOM and SAX.  Since the two flavors of org.w3c.dom and
> org.xml.sax are different, one XML parser is going to lose.
> I am trying to reconcile this mess, but I doubt that com.sun.xml will work
> with the newer org.w3c.dom and org.xml.sax classes/interfaces that are
> required to also support Xerces.
> Has anyone out there succeeded in assembling components that continue to
> have both Sun XML and Xerces dependencies?
> Thanks for any guidance on this.
> John W. Cocula
> Managed Objects

I'm not sure what you're doing, but I suggest you take a look at JDOM. 
It lets you avoid all kinds of these issues.  You may
see it as another cat, but it was created by myself and Brett McLaughlin
(author of O'Reilly's "Java and XML") partially to avoid this "cat
race".  Also to make XML work faster and easier.

With it you don't need JAXP (it uses an adapter model instead, so you
can use more parsers than JAXP supports (DOM2/SAX2 included) and you
don't need to ship the JAXP JAR).  You also don't really need DOM or SAX
unless you want to use them.  Just plug in whatever supporting parser
library you want -- and your versioning problems go away.

There's also a JavaWorld article on JDOM at


View raw message