[xsd-users] Turn On Validation - De-serializing Using DOMDocument
Boris Kolpackov
boris at codesynthesis.com
Tue Jan 10 07:52:44 EST 2012
Hi Jason,
Friess, Jason <jason.friess at lmco.com> writes:
> 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);
You can take a look at one of the examples that performs XML-to-DOM
parsing. For instance, 'multiroot'. In fact, you can just copy the
code (dom-parse.?xx) and use it in your application.
Boris
More information about the xsd-users
mailing list