- if (((fileExistS && saxHandlerS.GetHandlerStatus() == 0) || !fileExistS) && (!fileExistE || (saxHandlerE.GetHandlerStatus() == 0))) {
- Log("SAX handler reports no errors.");
- } else {
- if (fileExistS) {
- Log(Form("ERROR while creating calibration objects. SOR Error code: %s", saxHandlerS.GetHandlerStatus()));
- }
- if (fileExistE) {
- Log(Form("ERROR while creating calibration objects. EOR Error code: %s", saxHandlerE.GetHandlerStatus()));
- }
- return 14;
+ if (fileExistE && saxParserE.GetParseCode() != 0) {
+ Log(Form("ERROR in XML file validation. EOR Parse Code: %s", saxParserE.GetParseCode()));
+ return 13;
+ }
+ Log("XML file validation OK.");
+ // report errors of the handler if present
+ if (fileExistS && saxHandlerS.GetHandlerStatus() != 0) {
+ Log(Form("ERROR while creating calibration objects. SOR Error code: %s", saxHandlerS.GetHandlerStatus()));
+ return 14;