Implement a simple entity resolver and plug it into the parser. Just return an empty stream and the parser will he happy. See the examples for free code to rip off.
Regards Erik Rydgren Mandarinen systems AB Sweden -----Original Message----- From: Sergei Pavlovskiy [mailto:[EMAIL PROTECTED]] Sent: den 29 januari 2002 13:42 To: [EMAIL PROTECTED] Subject: Can't turn validation of SAX2 off completly. I try to parse XML-file with a referance to external DTD file with SAX2 parser. <!DOCTYPE clu SYSTEM "CLUInputConversion.DTD"> But DTD file (CLUInputConversion.DTD) is absent. I don't need validation, just want to check that my XML-file is well formed, so I turn validation off SAX2XMLReader* pParser = XMLReaderFactory::createXMLReader(); // turn off validation pParser->setFeature( XMLString::transcode("http://xml.org/sax/features/validation"), false); pParser->setFeature( XMLString::transcode("http://apache.org/xml/features/validation/dynamic"), false); But I get fatal error at that line (referance to external DTD file) and parsing terminates. Setting "ExitOnFirstFatalError" to true and/or "ValidationConstraintFatal" to false has no effect. But Microsoft parser do parse this file. Is there any way to avoid that an make parser to ignore external DTD referance? --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
