try {
Class documentBuilderClass = ClassLoading.loadClass(documentBuilderName, classLoader);
DocumentBuilderFactory documentBuilderFactory = (DocumentBuilderFactory) documentBuilderClass.newInstance();
return documentBuilderFactory;
} catch (Exception e) {
throw new FactoryConfigurationError(e, "Unable to create DocumentBuilderFactory " +
documentBuilderName + ", which was specified in the " + DOCUMENT_BUILDER_FACTORY + " system property");
}
}
return DocumentBuilderFactory.newInstance();