Install an EntityResolver handler. See FAQ
http://xml.apache.org/xerces-c/faq-parse.html#faq-35.
Thanks!
Tinny
Sergei Pavlovskiy wrote:
> 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]