Hi Pranav,
if you want to see the errors, you need to register an ErrorHandler.

Alberto

At 15.15 22/05/2007 +0530, Pranav, Savkur wrote:

Hello Alberto,
where can I get code samples that have schema validation of an XML file against an XSD?
I'm doing these in my code but the validation does not show any errors:

        m_pDOMParser->setExternalNoNamespaceSchemaLocation(strSchemaFile);
        //Get all errors
        m_pDOMParser->setExitOnFirstFatalError(true);
        //All validation errors are fatal.
        m_pDOMParser->setValidationConstraintFatal(true);
        //Set the validation scheme

m_pDOMParser->setValidationScheme(XERCES_CPP_NAMESPACE::XercesDOMParser::Val_Auto );
        //Set schema validation
        m_pDOMParser->setValidationSchemaFullChecking(false);
        //Use namespaces and schema
        m_pDOMParser->setDoNamespaces(true);
        m_pDOMParser->setDoSchema(true);

        m_pDOMParser->setIncludeIgnorableWhitespace(false);

Regards,
Pranav

Disclaimer:
This e-mail may contain trade secrets or privileged, undisclosed or otherwise confidential information. If you have received this e-mail in error, you are hereby notified that any review, copying or distribution of it is strictly prohibited. Please inform us immediately and destroy the original transmittal. Thank you for your cooperation.

Reply via email to