Hi all,
Im trying to validate the sample xml file given with
xerces2.8source..i.e..personnel.xml against the schema
personal.xsd
Im doing this
parser->setFeature(XMLUni::fgXercesSchema, true);
parser->setFeature(XMLUni::fgDOMValidation, true);
parser->setFeature(XMLUni::fgDOMNamespaces, true);
parser->setFeature(XMLUni::fgDOMDatatypeNormalization, true);
parser->setFeature(XMLUni::fgXercesValidateAnnotations, true);
parser->setFeature(XMLUni::fgXercesSkipDTDValidation, true);
XMLCh* test=XMLString::transcode("personal.xsd");
parser->setProperty(XMLUni::fgXercesSchemaExternalSchemaLocation,test);
parser->setFeature( XMLUni::fgXercesSchemaFullChecking, true);
myhandler* errHandler = new myhandler();
parser->setErrorHandler(errHandler);//Set error hadler to our own
handler to display appropriate messages
char* xmlFile = "personnel.xml";
DOMDocument *doc = 0;
try {
doc = parser->parseURI(xmlFile);//Parse the xml file into a DOM
tree
}
But the program is giving an error
The schemaLocation attribute does not contain pairs of values.
At line 4
At column 50
terminate called after throwing an instance of 'xercesc_2_8::DOMException'
Aborted (core dumped)
I need some help...Plz...
Thanks in advance,
Bharath Shankar