I have a series of SAX2 applications that use the constructor SAXParser() to create an instance of the parser.
XMLReader reader = new SAXParser();
These applications work fine.
The O'Reilly book on Java and XML indicates that this class (SAXParser) implements the org.xml.sax.XMLReader interface (pg. 50). If I change my code to use XMLReader instead of SAXParser, I get a ClassNotFoundException: org.apache.xerces.parsers.SAXParser.
Here's the code line that changed:
XMLReader parser = XMLReaderFactory.createXMLReader(
Can anyone explain to me why? This problem is also causing me troubles when trying to use Xalan.