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=23063>. 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=23063 DOMBuilder loadGrammar DTD access violation Summary: DOMBuilder loadGrammar DTD access violation Product: Xerces-C++ Version: 2.3.0 Platform: PC OS/Version: Windows XP Status: NEW Severity: Critical Priority: Other Component: Validating Parser (DTD) AssignedTo: [EMAIL PROTECTED] ReportedBy: [EMAIL PROTECTED] Hi, I'm trying to load a grammar to be used with a DOMBuilder. The problem is that when I call 'parser->loadGrammar(...)' an unknown exception is thrown. My debugger prints: First-chance exception in myXMLApp.exe (XERCES-C_2_3_0.DLL): 0xC0000005: Access Violation. I've tried numerous DTD's, and even the DTD 'personal.dtd' that comes with the download fails in the same matter. This is what I do: static const XMLCh gLS[] = { chLatin_L, chLatin_S, chNull }; DOMImplementation* impl = DOMImplementationRegistry::getDOMImplementation(gLS); DOMBuilder* parser = ((DOMImplementationLS*)impl)-> createDOMBuilder(DOMImplementationLS::MODE_SYNCHRONOUS,NULL); if(parser->canSetFeature(XMLUni::fgDOMNamespaces, true)) parser->setFeature(XMLUni::fgDOMNamespaces, true); if(parser->canSetFeature(XMLUni::fgXercesSchema, true)) parser->setFeature(XMLUni::fgXercesSchema, true); if(parser->canSetFeature(XMLUni::fgXercesSchemaFullChecking, true)) parser->setFeature(XMLUni::fgXercesSchemaFullChecking, true); if(parser->canSetFeature(XMLUni::fgDOMValidation, true)) parser->setFeature(XMLUni::fgDOMValidation, true); if(parser->canSetFeature(XMLUni::fgXercesLoadExternalDTD, true)) parser->setFeature(XMLUni::fgXercesLoadExternalDTD, true); Grammar* gram; try { gram = parser->loadGrammar("$THE_PATH/personal.dtd", Grammar::DTDGrammarType,true); } catch(const XMLException& problemExc){ char* message = XMLString::transcode(problemExc.getMessage()); XMLString::release(&message); } catch(const DOMException& problemExc) { char* message = XMLString::transcode(problemExc.msg); XMLString::release(&message); } catch(const SAXException& problemExc) { char* message = XMLString::transcode(problemExc.getMessage()); XMLString::release(&message); } catch(...) { // This is where I end up! printf("Unknown Exception\n"); } I would really appreciate an answer. Thanks, Patric. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
