c++ - Validating against multiple xml schemas with Xerces DOM parser -
i wondering if there way validate against multiple xml schemes using xerces dom parser in c++?
here use-case: want able parse multiple xml files against corresponding xsd schema. however, when @ each xml file, not know file until parse it, hence cannot link static xsd file it. there way of saying, want validate each xml file against xsd1 or xsd2 or etc...
after reading around appears settings of parser 'setexternalschemalocation' able hold list of schemes when in code, doesn't validate correctly.
parser->setexternalschemalocation("http://www.somelocation schema.xsd http://www.somelocation schema1.xsd");
the schema works if did
parser->setexternalschemalocation("http://www.somelocation schema.xsd");
so there no error in xml or xsd file.
any insights how validate against multiple xml schemas?
the code not work if each xml in same namespace. each xml file must in different namespace in order code above work.
parser->setexternalschemalocation("http://www.somelocation schema.xsd http://www.somelocation1 schema1.xsd");
Comments
Post a Comment