XmlDocumentLoader documentLoader = new XmlDocumentLoader();
documentLoader.setValidationMode(XmlDocumentLoader.VALIDATION_NONE);
documentLoader.setNamespaceAware(true);
XmlDefinitionResolver delegatingResolver = new XmlDefinitionResolver();
XmlDefinitionManager xmlDefinitionManager = new XmlDefinitionManager();
Properties properties = PropertiesLoaderUtils.loadClassPathProperties(
xmlDefinitionMappingsLocation, null);
PropertiesXmlDefinitionParser propertiesXmlDefinitionParser = new PropertiesXmlDefinitionParser();
xmlDefinitionManager
.addDefinitionMappings(propertiesXmlDefinitionParser
.parser(properties));
delegatingResolver.setXmlDefinitionManager(xmlDefinitionManager);
documentLoader.setEntityResolver(delegatingResolver);