Hi Deepack,
I have tried your code with Visual C++ 6 and the binary release of Xerces-C 2.7, and it works fine. Be sure to test for parser->getErrorCount() to return 0 before trying to access the DOMDocument, or an access violation will occur.

Alberto

At 17.08 11/07/2007 +0530, M V Deepak wrote:
Hi Alberto,

Please find zip file as an attachment.
It contains:
1. Test.cpp
2. TestSummary.xml
3. TestSummary.xsd

Regards,
- Deepak

On 7/11/07, Alberto Massari <[EMAIL PROTECTED]> wrote:
Hi Deepack,
I received only the XSD file....

Alberto

At 13.17 11/07/2007 +0530, M V Deepak wrote:
>Hi Alberto,
>
>Thanks for a quick reply.
>Please find attached cpp file, xml and xsd files.
>As you said , I placed XMLException before DOMException, but the
>problem still exists.
>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!!!!!!!!)
>
>An early response will be greatly appreciated.
>
>Regards,
>- Deepak
>
>
>
>On 7/10/07, Alberto Massari <[EMAIL PROTECTED]> wrote:
>>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
>>
>
>
>Content-Type: application/xml; name=TestSummary.xsd
>X-Attachment-Id: file3
>Content-Disposition: attachment; filename="TestSummary.xsd"
>



Content-Type: application/zip; name="Test.zip"
Content-Disposition: attachment; filename="Test.zip"
X-Attachment-Id: file0



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to