Hi all,
I am using SAX parser to parse the xml file.
Giving the lines of code as follows:
The jar files that r in my server's lib folder are:
i)sax.jar
ii)saxon.jar
iii)saxon-fop.jar
iv)saxon-jdom.jar
when i remove the saxon.jar the code works fine.
but it is required to run the application.So with saxon.jar added it is giving exception.
the exception is :
org.xml.sax.SAXException: The AElfred parser is a SAX2 XMLReader
SAXParserFactory saxparserfactory = SAXParserFactory.newInstance();
try
{
SAXParser saxparser = saxparserfactory.newSAXParser();
ParserAdapter parseradapter = new ParserAdapter(saxparser.getParser());
parseradapter.setContentHandler(handler);
parseradapter.parse(new InputSource(new FileInputStream(new File(filename))));
return true ;
} catch (Throwable t) {
System.out.println("Exception in cache.oeb.SaxParser.saxParse() ="+t);
//t.printStackTrace();
return false ;
}
}