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]

Reply via email to