I am trying to upgrade to  Xerces 2, we are trying something very trivial but it will not work:
 
import org.apache.xerces.parsers.SAXParser;
import org.xml.sax.XMLReader;
import org.xml.sax.helpers.XMLReaderFactory;
 

/**
 * @testcase net.onesaf.services.data.xml.sax.TestSAX
 */
public class SAX {
 

    public SAX(){
        try {
            System.out.println("In here");
        XMLReader parser = XMLReaderFactory.createXMLReader(
     "org.apache.xerces.parsers.SAXParser");
   System.out.println("out here");
        }
        catch(Exception e){
   System.out.print(e);
        }
    }
 
but we keep getting a ClassCastException
In here
 
java.lang.ClassCastException
 
What are we doing wrong?
 
Thanks,
 
Rob

Reply via email to