if (validate) {
try {
// Set an ErrorHandler before parsing
OutputStreamWriter errorWriter =
new OutputStreamWriter(System.err, "UTF-8");
db.setErrorHandler(new ConfigErrorHandler(new PrintWriter(errorWriter, true)));
//new MyErrorHandler(new PrintWriter(errorWriter, true)));
} catch (Exception e) {
ErrorReporter.getErrorHandler().reportError("The parser cannot set up the error handler",e);
throw new ConfigurationManagerException("The parser cannot set up the error handler");
}