You should not catch DOMException, but XMLException. Also, can you
attach the XML and XSD files?
Alberto
At 20.03 10/07/2007 +0530, M V Deepak wrote:
Hello,
I am using the xerces C++ dll i.e xerces-c_2_7D.dll , with MSVS 2005.
Basically I am trying to validate schema of xml files using xsd file.
When I use "TestSummary.xsd" to validate "TestSummary.xml" using
below code , When I run it , control reaches till
parser->parse(TestSummary.xml); of try block after that it goes to
return -1; of catch block with out printing "cout" on command
prompt(very strange!!!!!!!!)
XMLPlatformUtils::Initialize();
parser = new XercesDOMParser();
parser->setDoNamespaces(true);
parser->setDoSchema(true);
parser->setValidationScheme(XercesDOMParser::Val_Always);
parser->setExternalNoNamespaceSchemaLocation("TestSummary.xsd");
try{
parser->parse(TestSummary.xml);
}
catch (const DOMException& toCatch) {
cout << "Exception "<< endl;
return -1;
}
Any help would be greatly appreciated.
Thanks in advance.
- Deepak
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]