Todd, how come you're using the XMLReaderFactory instead of JAXP 1.1 (i.e.
javax.xml.parsers.SAXParserFactory)??
> System.setProperty("org.xml.sax.driver",
> "org.apache.crimson.jaxp.SAXParserFactoryImpl");
> System.out.println("org.xml.sax.driver property set to: " +
> System.getProperty("org.xml.sax.driver"));
>
>(( ...this is the setting used in many of the qetest programs ... )))
>
>and with crimson.jar in my CLASSPATH, the second run gives a
>
> java.lang.ClassCastException:
> org.apache.crimson.jaxp.SAXParserFactoryImpl.
I think org.apache.crimson.jaxp.SAXParserFactoryImpl is probably the
implementation of javax.xml.parsers.SAXParserFactory, not XMLReader. I'm
not sure, but I think there's a org.apache.crimson.parser.XMLReaderImpl in
there.
-scott
"G. Todd
Miller - XML To: [EMAIL PROTECTED]
Tech Ctr - cc: [EMAIL PROTECTED], (bcc: Scott
Boag/CAM/Lotus)
Development" Subject: Help using
XMLReaderFactory.createXMLReader()
<Glenn.Miller
@Sun.COM>
06/19/2001
03:22 PM
Please
respond to
xalan-dev
Sorry if this is a really stupid question, but....
How do I use XMLReaderFactory.createXMLReader() ?
the way I am trying to use it is simply:
import org.xml.sax.XMLReader;
import org.xml.sax.helpers.XMLReaderFactory;
...
XMLReader reader = XMLReaderFactory.createXMLReader();
when I run this, I get an SAXException that complains that I have not
set the sys prop 'org.xml.sax.driver'. So in my next attempt, I
programmatically set the property as:
System.setProperty("org.xml.sax.driver",
"org.apache.crimson.jaxp.SAXParserFactoryImpl");
System.out.println("org.xml.sax.driver property set to: " +
System.getProperty("org.xml.sax.driver"));
(( ...this is the setting used in many of the qetest programs ... )))
and with crimson.jar in my CLASSPATH, the second run gives a
java.lang.ClassCastException:
org.apache.crimson.jaxp.SAXParserFactoryImpl.
Any pointers on how I am supposed to use this ? Clearly I am missing
something, not sure where to look next....
Thanks,
Todd Miller
=======================================================================
G. Todd Miller Sun Microsystems Computer Company
Software Systems Engineer 2 Network Drive, MS UBUR02-201
GE&IS XML Tech Center Burlington, MA 01803-0903
781 442-0176
781 442-1437 (fax)
[EMAIL PROTECTED]