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 Yoriko Nakata <na...@cjs.co.jp> on 2000/12/01 14:01:56 UTC

Read DTD?

Hello,
I use DOMParser. I want to parse XML file including DTD file.
If DTD file isn't exist,parser returns error.
If Parser parse by  no validation check mode, parser read DTD?
Could anybody tell me how to parse  without DTD file.

Thanks.Yoriko Nakata.


Re: Read DTD?

Posted by Khaled Noaman <kn...@ca.ibm.com>.
If you want to parse XML file (that includes external DTD) without
parsing the DTD, then you need to register an EntityResolver with the
parser, and reset the the DTD file to "". Take a look at the Redirect
sample on how to register an EntityResolver to a parser for handling
external enities behavior.

Regards,
Khaled Noaman
XML Parser Dev.- IBM Toronto Lab
knoaman@ca.ibm.com

Yoriko Nakata wrote:

> Hello,
> I use DOMParser. I want to parse XML file including DTD file.
> If DTD file isn't exist,parser returns error.
> If Parser parse by  no validation check mode, parser read DTD?
> Could anybody tell me how to parse  without DTD file.
>
> Thanks.Yoriko Nakata.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
> For additional commands, e-mail: xerces-c-dev-help@xml.apache.org

Re: Read DTD?

Posted by Yoriko Nakata <na...@cjs.co.jp>.
Thank you for your advices.

I tried register an EntityResolver with the parser. Then I could parse XML
file without parsing DTD(that is not exist).

Thanks.  Yoriko Nakata.