|
I
don't believe the XML 1.0 specification provides a mechanism to specify a DTD
except through the DOCTYPE element.
Cheers!
Brion
Thanks for the
suggestion Brion.
This suggestion will
work, but I don't really want to "modify" the original XML
stream
Just kinda surprised
that there's no API in xerces to specify a DTD that I want to validate
against
thx,
Henry
-----Original
Message----- From: Swanson,
Brion [mailto:[EMAIL PROTECTED] Sent: Friday, November 08,
2002 5:48
AM To:
'[EMAIL PROTECTED]' Subject: RE: Validating against a
DTD
The way I've handled
this in the past is to peek at the incoming stream before the parser ever gets
a look at it, and insert a DOCTYPE element in the front of the stream.
Note: this may require removing or saving the XML processing instruction
and/or any comments that appear before the document element if those items are
important to you.
-----Original
Message----- From: Henry
Chan [mailto:[EMAIL PROTECTED] Sent: Thursday, November 07, 2002 6:33
PM To:
[EMAIL PROTECTED] Subject: Validating against a
DTD
Hi
all,
Just wondering if there
was a way to validate an XML doc against a DTD
*WITHOUT* the XML doc
specifying which DTD to load (i.e. no DOCTYPE) My customer is sending an XML
stream and I want to validate it against my own DTD
thx,
Henry
|