I am new to XML parsing. I am using xmlvalid parser to do parsing of xml files. But I want to user Xerces java version. I have downloaded the binary file and unzipped. Can you please explain me the command for execution of this xml parser.
Thanks
Ganesh
Rishi Khanna wrote:
Hello Everyone,I have been using the Xerces J SAXParser for some time now. I recently made a modification to my codebase, only to find that I am now getting a NoClassDefFoundError when I call the SAXParser.parse(InputSource in) method.The xercesImpl JAR is still in my classpath. My changes had nothing to do with how I am using the parser. Furthermore, I am still able to set the handlers and features.I would really appreciate any help you guys can give me in regards to solving this problem....Thanks in advance... RishiHere is the code segment:XMLReader parser = (XMLReader) Class.forName(DEFAULT_PARSER_NAME).newInstance();
if (parser == null) {
return false;
}
parser.setContentHandler(mapStore);
parser.setErrorHandler(mapStore);parser.setFeature("http://xml.org/sax/features/validation", setValidation);
parser.setFeature("http://xml.org/sax/features/namespaces", setNameSpaces);
parser.setFeature(
"http://apache.org/xml/features/validation/schema",
setSchemaSupport);InputStream byteIn;
for (int i=0; i < fileList.length; i++) {
String filePath = MyFileManager.getConfigFolder() + fileList[i];
byteIn = new FileInputStream(filePath);
if (byteIn == null) {
initException = new NonFatalParseException("Failed loading one or more configuration files.");
}
else {
InputSource in = new InputSource(byteIn);
parser.parse(in);
MyFileManager.addLoadedFiles(fileList[i]);
byteIn = null;
in = null;
}
}
mapStore = null;
parser = null;
return true;
}
catch (Throwable e) {
initException = new FatalParseException(e.getMessage());
return false;
}
--
Your favorite stores, helpful shopping tools and great gift ideas. Experience the convenience of buying online with [EMAIL PROTECTED] http://shopnow.netscape.com/
Your favorite stores, helpful shopping tools and great gift ideas. Experience the convenience of buying online with [EMAIL PROTECTED] http://shopnow.netscape.com/
