}
Parser::~Parser()
{
+ xmlSetGenericErrorFunc(NULL, NULL);
+ xmlThrDefSetGenericErrorFunc(NULL, NULL);
}
using SchemaParserCtxt =
return ERROR_INVALID_ARGUMENT;
}
+ xmlSetGenericErrorFunc(this, &Parser::ErrorValidate);
+ xmlThrDefSetGenericErrorFunc(this, &Parser::ErrorValidate);
+
Schema schema(xmlSchemaParse(parserCtxt.get()), [](xmlSchemaPtr schemaPtr) {
xmlSchemaFree(schemaPtr);
});
return ERROR_INTERNAL;
}
- xmlSetStructuredErrorFunc(NULL, NULL);
- xmlSetGenericErrorFunc(this, &Parser::ErrorValidate);
- xmlThrDefSetStructuredErrorFunc(NULL, NULL);
- xmlThrDefSetGenericErrorFunc(this, &Parser::ErrorValidate);
-
retCode = xmlSchemaValidateFile(validCtxt.get(), m_XMLfile.c_str(), 0);
if (0 != retCode) {
return ERROR_INVALID_ARGUMENT;
}
+ xmlSetGenericErrorFunc(this, &Parser::Error);
+ xmlThrDefSetGenericErrorFunc(this, &Parser::Error);
+
int retCode = xmlSAXUserParseFile(&m_saxHandler, this, m_XMLfile.c_str());
if (0 != retCode) {