Well, I too had this kind of requirement some time back.
I didn't find any direct API for doing this. Easiest thing is
prepending doctype decleration of external dtd to xml string
before passing to parser.
--- Raj.
> -----Original Message-----
> From: Shantanu Dutta [SMTP:[EMAIL PROTECTED]]
> Sent: Tuesday, December 18, 2001 3:12 AM
> To: [EMAIL PROTECTED]
> Cc: [EMAIL PROTECTED]
> Subject: Validating XML.
>
> Hi,
>
> I have been looking to validate and XML, without
> having a reference of the DTD in the XML file. I am
> not so sure if this is possible.
> At present, I have an XML string as a return value of
> a function and cannot have information regarding the
> DTD in the string itself. So, I want to know if there
> is an API that takes the XML file path & the DTD file
> path and validates the XML.
> I would really appreciate any information on this.
>
> Beside, while parsing an XML document using DOMParser,
> I refer to the DTD using the following in the XML
> file:
> <!DOCTYPE NEInfo [
> ...
> ]>
>
> But while parsing, the parser tries to parse the above
> ("DOCTYPE") as an element.
> I am not sure if this is a valid behaviour.
> Please let me know any inputs on this.
>
> Cheers
> Shantanu.
>
> __________________________________________________
> Do You Yahoo!?
> Check out Yahoo! Shopping and Yahoo! Auctions for all of
> your unique holiday gifts! Buy at http://shopping.yahoo.com
> or bid at http://auctions.yahoo.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
"MMS <firstam.com>" made the following
annotations on 12/18/01 10:19:36
------------------------------------------------------------------------------
"THIS E-MAIL MESSAGE AND ANY FILES TRANSMITTED HEREWITH, ARE INTENDED SOLELY FOR THE
USE OF THE INDIVIDUAL(S) ADDRESSED AND MAY CONTAIN CONFIDENTIAL, PROPRIETARY OR
PRIVILEGED INFORMATION. IF YOU ARE NOT THE ADDRESSEE INDICATED IN THIS MESSAGE (OR
RESPONSIBLE FOR DELIVERY OF THIS MESSAGE TO SUCH PERSON) YOU MAY NOT REVIEW, USE,
DISCLOSE OR DISTRIBUTE THIS MESSAGE OR ANY FILES TRANSMITTED HEREWITH. IF YOU RECEIVE
THIS MESSAGE IN ERROR, PLEASE CONTACT THE SENDER BY REPLY E-MAIL AND DELETE THIS
MESSAGE AND ALL COPIES OF IT FROM YOUR SYSTEM."
==============================================================================
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]