There're really samples bundled with xercesc which can validate xml with
schema.
See "DOMCount" and "DOMPrint" in the example/src directory. You can find
example
xml and schema file in example/data directory.
Sanat Talmaki wrote:
Hi,
I am having errors parsing my xml file when I use the set the following 2
function calls to true. When I had them set to false, the file parses
correctly.
parser->setDoSchema(true);
parser->setDoNamespaces(true);
Initially I set my schema using:
XercesDOMParser* parser = new XercesDOMParser();
parser->setValidationScheme(XercesDOMParser::Val_Always);
parser->setExternalNoNamespaceSchemaLocation(xmlSchema);
parser->setDoNamespaces(true);
The reason I am trying to validate my xml file against a schema is to allow
me to ignore whitespaces.
Any pointers would be very very helpful
Thank You
Regards,
Sanat.