Hi All,
I experienced a problem in validating DTD explained as follows:
My problem is:
I have the code like this:
doc = xmlReadFile("sample.xml", NULL, 0);
dtd = xmlParseDTD(NULL,"sample.dtd" );
cvp = xmlNewValidCtxt();
valid=xmlValidateDtd(cvp, doc, dtd);
When the xml file is not matchng with the DTD, function 'xmlValidateDtd' is returning value 0 and the reason for invalidity is printed in the console.
My project needs this error message to be returned to a calling function. Please help me out to resolve the issue.
Thanks,
Senthil