public static Document loadDocument(Reader reader, String description) {
Document document = null;
DefaultDocumentLoader loader = new DefaultDocumentLoader();
try {
InputSource inputSource = new InputSource(reader);
document = loader.loadDocument(inputSource, null, new SimpleSaxErrorHandler(logger),
XmlBeanDefinitionReader.VALIDATION_NONE, false);
}
catch (Exception e) {
throw new ExecutionException("Unable to load XML document from resource " + description, e);
}