Package org.springframework.util.xml

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


        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

    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

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.