[xsd-users] Turn On Validation - De-serializing Using DOMDocument

Friess, Jason jason.friess at lmco.com
Mon Jan 9 21:46:14 EST 2012


Hi,

I'm trying to go from XML to a Xerces-C++ DOM Document and then pass the DOMDocument to a CodeSynthesis generated de-serialization method.  This seems to de-serialize properly - but thus far I've been unable to turn on validation.

In my DOMConfiguration object I'm setting the relevant validation parameters as follows:
DOMConfiguration *conf;
conf->setParameter(XMLUni::fgDOMValidate, true);
conf->setParameter(XMLUni::fgXercesSchema, true);
conf->setParameter(XMLUni::fgXercesSchemaFullChecking, true);

I've also confirmed that when I pass the DOMDocument to the CodeSynthesis serialization method - I'm NOT passing xml_schema::flags::don't_validate.

Would you be able to shed some light on anything else I need to be doing to turn on validation?

Thanks!
Jason


More information about the xsd-users mailing list