Examples of bindNamespaceUri()


Examples of org.springframework.util.xml.SimpleNamespaceContext.bindNamespaceUri()

        if (isMavenProject()) {
            try {
                String pomXml = FileUtils.readToString(new FileSystemResource(new File(getMavenPomFilePath())));
                SimpleNamespaceContext nsContext = new SimpleNamespaceContext();
                nsContext.bindNamespaceUri("mvn", "http://maven.apache.org/POM/4.0.0");

                Document pomDoc = XMLUtils.parseMessagePayload(pomXml);
                projectInfo.put("basePackage", XPathUtils.evaluateExpression(pomDoc, "/mvn:project/mvn:groupId", nsContext, XPathConstants.STRING));
                projectInfo.put("name", XPathUtils.evaluateExpression(pomDoc, "/mvn:project/mvn:artifactId", nsContext, XPathConstants.STRING));
                projectInfo.put("version", XPathUtils.evaluateExpression(pomDoc, "/mvn:project/mvn:properties/mvn:citrus.version", nsContext, XPathConstants.STRING));
View Full Code Here

Examples of org.springframework.util.xml.SimpleNamespaceContext.bindNamespaceUri()

        return mapContent;
    }

    void initXPath(XPath xpath) {
        SimpleNamespaceContext ctx = new SimpleNamespaceContext();
        ctx.bindNamespaceUri("kml", "http://www.opengis.net/kml/2.2");
        xpath.setNamespaceContext(ctx);
    }

    /**
     * Creates a key/value pair map from the cgi parameters in the provided url
View Full Code Here

Examples of org.springframework.util.xml.SimpleNamespaceContext.bindNamespaceUri()

    return ctx;
  }

  private static NamespaceContext create() {
    SimpleNamespaceContext ctx = new SimpleNamespaceContext();
    ctx.bindNamespaceUri("oai20", OaiPmhConstants.OAI_2_0_XML_NS);
    return ctx;
  }
}
View Full Code Here

Examples of org.springframework.xml.namespace.SimpleNamespaceContext.bindNamespaceUri()

        if (!CollectionUtils.isEmpty(namespaces)) {
            //dynamic binding of namespaces declarations in root element of received message
            for (Entry<String, String> binding : dynamicBindings.entrySet()) {
                //only bind namespace that is not present in explicit namespace bindings
                if (!namespaces.containsValue(binding.getValue())) {
                    simpleNamespaceContext.bindNamespaceUri(binding.getKey(), binding.getValue());
                }
            }
            //add explicit namespace bindings
            simpleNamespaceContext.setBindings(namespaces);
        } else {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.