Hi Donald,

If you don't want the parser to read (DTD) external subesets, there's a
feature that you can set that will cause the parser to ignore external
DTDs when validation is off.

Have a look at:
http://xml.apache.org/xerces2-j/features.html#nonvalidating.load-external-dtd

If you want to ignore certain external DTDs but not all of them, try
registering an entity resolver that returns an InputSource containing an
empty input stream (not null) for the DTDs you don't want to load.

Hope that helps.

On Wed, 10 Sep 2003, Holliday, Donald B. (LNG-CSP) wrote:

> I periodically receive a set of documents that specify a DTD through a
> public identifier in the DOCTYPE.  I get them from someone else.  I don't
> have the DTD, and don't need it.  I just want to parse the documents as well
> formed XML, and not as valid XML.  I don't need entities expanded or default
> values assigned.
>
> I couldn't find a description of how to do this in the FAQs, or in a search
> of the list archives.
>
> How do I configure the parser to know that despite the public identifier in
> the DOCTYPE, the lack of a DTD is OK, just parse the documents and hand me
> back a DOM document object?
>
> Thanks,
>
> Donald Holliday
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]

--------------------
Michael Glavassevich
[EMAIL PROTECTED]

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to