Click to See Complete Forum and Search --> : Validating XML document using external DTD in VC++


sharmasourabh54
March 21st, 2005, 04:08 AM
Hello everyone,

I want to know whether it is possible to validate an XML document, having DTD defination in some other file programatically in a win32 console VC++ application using IXMLDOMDoc etc. interface method? If yes, please tell me how!!

Till now I have done it for XML files having the DTD defination in the same XML file by using put_ValidateOnParse method of IXMLDOMDoc interface.

Thank You,
Sourabh Sharma

Krzemo
March 24th, 2005, 02:15 AM
is possible to validate an XML document, having DTD defination in some other file if U don't want the DTD to be embeded in xml than define it in xml in that way :
<!DOCTYPE MyDocumentType SYSTEM "MyDTDfile.dtd">
Than the file "MyDTDfile.dtd" should be in the same directory (since it is not an abolute path) as the XML file .

Best regards,
Krzemo

yourpalcliffy
April 24th, 2009, 05:35 AM
And what should I do if I want to ignore the dtd in the xml and use an external DTD?