Hi,
I am using Xerces 2.8.
When I try to validate a file which is in the same folder as the xsd, it works fine. But if I try to validate an XML file which is in some other folder, it gives me a whole load of "unknown element" errors for every element in my XML file.
This is the code that I am using:
The filename is being passed correctly.
I am using Xerces 2.8.
When I try to validate a file which is in the same folder as the xsd, it works fine. But if I try to validate an XML file which is in some other folder, it gives me a whole load of "unknown element" errors for every element in my XML file.
This is the code that I am using:
Code:
XMLPlatformUtils::Initialize();
XercesDOMParser *parser = new XercesDOMParser;
parser->setValidationScheme(XercesDOMParser::Val_Always);
parser->setDoNamespaces(true);
parser->setDoSchema(true);
parser->setValidationSchemaFullChecking(true);
parser -> setExternalSchemaLocation ("http://blah blah.xsd");
ParseErrorHandler *handler = new ParseErrorHandler();
parser->setErrorHandler(handler);
parser->parse(filename);
Comment