validator.setRoot(node);
// validate the XML
xmlReader.parse(inputSource);
} catch (IOException e) {
throw new UndeclaredThrowableException(e);
} catch (SAXException e) {
if (e instanceof TerminateParsingException) {
// Validation has been forcibly terminated. Take no action.
if (logger.isDebugEnabled()) {
logger.debug("Validation was terminated with a " +
"TerminateParsingException", e);
}
} else {
throw new UndeclaredThrowableException(e);
}
} catch (ConcurrentModificationException e) {
// If this happens it indicates that a change has been made to
// the document being validated while validation is in progress
// and this change has prevented validation from completing. The