}
builder.setEntityResolver(ConfigurationEntityResolver.INSTANCE);
Document document = builder.parse(xml);
return document.getDocumentElement();
} catch (ParserConfigurationException e) {
throw new ConfigurationException("Unable to create configuration XML parser", e);
} catch (SAXParseException e) {
throw new ConfigurationException("Configuration file syntax error. (Line: " + e.getLineNumber() + " Column: " + e.getColumnNumber() + ")", e);
} catch (SAXException e) {
throw new ConfigurationException("Configuration file syntax error. ", e);
} catch (IOException e) {
throw new ConfigurationException("Configuration file could not be read.", e);
}
}