You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-dev@xerces.apache.org by Xiaofan Zhou <Xi...@businessobjects.com> on 2005/01/27 00:12:54 UTC
How can I ignore DTD in an XML file
Hi, All,
Is there a feature that I can simple set to turn off the default
behavior to resolve a DTD entity included in an XML file? The DTD is
included in an XML using:
<!DOCTYPE l1 SYSTEM "some.dtd">
I tried setValidationScheme(DOMParser::Val_Never), but it still try to
find the DTD, which failed. I know I can implemented a EntityResolver to
ignore it, but is there a better way? I am using xerces 1.7, BTW.
Thanks in advance.
Frank
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-c-dev-help@xml.apache.org
Re: How can I ignore DTD in an XML file
Posted by Michael Fuller <mi...@rmit.edu.au>.
On Thu, Jan 27, 2005 at 10:05:15AM +0000, Gareth Reakes wrote:
> XML Parsers still have to resolve the DTD for entities, even if you
> don't want to do validation.
Why? If I want to validate using a W3C XML Schema, why do I have to
read the DTD? Are you suggesting that Xerces will read the external
DTD and use any entity definitions it finds when it is not doing
DTD-based validation?
> Cheers,
> Gareth
Michael
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-c-dev-help@xml.apache.org
Re: How can I ignore DTD in an XML file
Posted by Gareth Reakes <ga...@parthenoncomputing.com>.
Hi,
XML Parsers still have to resolve the DTD for entities, even if you
don't want to do validation.
Cheers,
Gareth
On 26 Jan 2005, at 23:12, Xiaofan Zhou wrote:
> Hi, All,
>
> Is there a feature that I can simple set to turn off the default
> behavior to resolve a DTD entity included in an XML file? The DTD is
> included in an XML using:
>
> <!DOCTYPE l1 SYSTEM "some.dtd">
>
> I tried setValidationScheme(DOMParser::Val_Never), but it still try to
> find the DTD, which failed. I know I can implemented a EntityResolver
> to
> ignore it, but is there a better way? I am using xerces 1.7, BTW.
>
> Thanks in advance.
>
> Frank
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
> For additional commands, e-mail: xerces-c-dev-help@xml.apache.org
>
>
>
--
Gareth Reakes, Managing Director Parthenon Computing
+44-1865-811184 http://www.parthcomp.com
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-c-dev-help@xml.apache.org