[jdom-interest] Crimson

Jason Hunter jhunter at acm.org
Sun Apr 28 22:40:57 PDT 2002


JDOM prefers to use JAXP to select the parser, and JAXP prefers Crimson,
so if you have the JAXP and Crimson jars in your classpath, the no-arg
SAXBuilder() constructor will use Crimson.

-jh-

Reto Badertscher wrote:
> 
> Hello,
> 
> just downloaded jDom Beta8 and wanted to try out the Crimson parser. So
> didn't provide a SAXDriver class - but this caused the following error when
> using the build method of the class SAXBuilder :
> > org.jdom.JDOMException: Error in building:
> org.apache.crimson.parser.XMLReaderImpl <
> 
> When using "org.apache.xerces.parsers.SAXParser" everything is fine.
> 
> I have crimson.jar, xerces.jar, xalan.jar, jdom.jar and jaxp.jar in my
> classpath. Until now i used always xerces, but because of jar footprint and
> jaxp support i wanted to use crimson.
> 
> Program-Code:
> SAXBuilder builder = null;
> if (saxDriverClass != null)
>   builder = new SAXBuilder(saxDriverClass, aValidateFlag);
> else
>   builder = new SAXBuilder(aValidateFlag);
> 
>   // Build the JDOM Document and get the root element
>   try {
>     Document doc = builder.build(new File(aFileName)); <-- Causes error
> 
> Can please somebody give me some help to find out what i'm doing wrong. BTW,
> jDom is a great product which i'm using since about half a year for XML
> parsing and it makes it very easy.
> 
> Thanks for any help
> 
> Reto Badertscher
> 
> _______________________________________________
> To control your jdom-interest membership:
> http://lists.denveronline.net/mailman/options/jdom-interest/youraddr@yourhost.com



More information about the jdom-interest mailing list