Package org.auto.xml

Examples of org.auto.xml.XmlDefinitionResolver


    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);

    ClassPathResource resource = new ClassPathResource(
        "org//auto//dataSync-ywgy.sync.xml");
    Document document = documentLoader.loadDocument(resource
View Full Code Here


  private void initDocumentLoader() {
    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);
    this.documentLoader = documentLoader;
  }
View Full Code Here

TOP

Related Classes of org.auto.xml.XmlDefinitionResolver

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.