DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://nagoya.apache.org/bugzilla/show_bug.cgi?id=25930>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=25930 Problems with SAXParser and getErrorCount Summary: Problems with SAXParser and getErrorCount Product: Xerces-C++ Version: 2.4.0 Platform: PC OS/Version: Windows XP Status: NEW Severity: Normal Priority: Other Component: Validating Parser (DTD) AssignedTo: [EMAIL PROTECTED] ReportedBy: [EMAIL PROTECTED] Given the following code, I create a SAXParser and call the methods as shown. DTDValidator *validator = new DTDValidator(); SAXParser saxParser(validator); saxParser.setValidationScheme(SAXParser::Val_Always); saxParser.setErrorHandler(&handler); saxParser.setDTDHandler(&dtdHandler); saxParser.setDocumentHandler(saxReader); saxParser.parse(fileName); if (saxParser.getErrorCount() != 0) ThrowException("Invalid format or corrupted file."); The XML file I am reading in has an embedded DTD within it using the !DOCTYPE tag. When I set breakpoints in my custom DTDHandler as well as my custom ErrorHandler, the only methods that get called are the standard Reset ones. I can purposely make the file invalid by removing tags and no error calls are ever made to the ErrorHandler. getErrorCount never returns zero, even for a correct file. Is the SAXParser ignoring an embedded DTD or something? I've had this problem in both 2.4.0 and 1.6.0. Please advise. Thank you. Ryan Jackson Software Engineer Applied Technologies Associates --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]