当前位置: 首页>>代码示例>>Java>>正文


Java Jaxp13XPathTemplate类代码示例

本文整理汇总了Java中org.springframework.xml.xpath.Jaxp13XPathTemplate的典型用法代码示例。如果您正苦于以下问题:Java Jaxp13XPathTemplate类的具体用法?Java Jaxp13XPathTemplate怎么用?Java Jaxp13XPathTemplate使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


Jaxp13XPathTemplate类属于org.springframework.xml.xpath包,在下文中一共展示了Jaxp13XPathTemplate类的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: isSoap

import org.springframework.xml.xpath.Jaxp13XPathTemplate; //导入依赖的package包/类
/**
 * Returns true if the documents root is SOAP envelope.
 * @param document
 * @return
 */
public static boolean isSoap(Source source) {
	for (String prefix: SOAP_NAMESPACES.keySet()) {
		String expression = "/"+prefix+":Envelope";
		Jaxp13XPathTemplate xpathTemplate = new Jaxp13XPathTemplate();
		xpathTemplate.setNamespaces(SOAP_NAMESPACES);
		if (xpathTemplate.evaluateAsBoolean(expression, source))
		{
			return true;
		}
	}
	return false;
}
 
开发者ID:lukas-krecan,项目名称:smock,代码行数:18,代码来源:XmlUtil.java

示例2: buildURLs

import org.springframework.xml.xpath.Jaxp13XPathTemplate; //导入依赖的package包/类
@Override
public List<String> buildURLs() {
    List<String> urls = new ArrayList<String>();
    String str = httpResourceContentFetcher.getContent(jenkinsURL + "api/xml");

    Jaxp13XPathTemplate template = new Jaxp13XPathTemplate();
    List<Node> nodes = template.evaluateAsNodeList("//job/url", new StringSource(str));
    for (Node node : nodes) {
        urls.add(node.getTextContent());
    }

    return urls;
}
 
开发者ID:gboissinot,项目名称:jenkins-csvexporter,代码行数:14,代码来源:RemoteJenkinsReader.java

示例3: xPathTemplate

import org.springframework.xml.xpath.Jaxp13XPathTemplate; //导入依赖的package包/类
@Bean(name = "xPathTemplate")
public XPathOperations xPathTemplate() {
    return new Jaxp13XPathTemplate();
}
 
开发者ID:quanticc,项目名称:ugc-bot-redux,代码行数:5,代码来源:RestConfiguration.java

示例4: getXPathTemplate

import org.springframework.xml.xpath.Jaxp13XPathTemplate; //导入依赖的package包/类
@Bean(name = "xpathTempate")
public XPathOperations getXPathTemplate() {
    return new Jaxp13XPathTemplate();
}
 
开发者ID:jhaood,项目名称:github-job-keywords,代码行数:5,代码来源:RestClientConfiguration.java

示例5: evaluateXpath

import org.springframework.xml.xpath.Jaxp13XPathTemplate; //导入依赖的package包/类
public static List<Node> evaluateXpath(final String expression, final Source source) {
    Jaxp13XPathTemplate template = new Jaxp13XPathTemplate();
    template.setNamespaces(getXpathNamespaces());
    return template.evaluate(expression, source, returnNode);
}
 
开发者ID:digipost,项目名称:sdp-shared,代码行数:6,代码来源:XpathUtil.java

示例6: isTemplate

import org.springframework.xml.xpath.Jaxp13XPathTemplate; //导入依赖的package包/类
/**
 * Returns true if given message is a XSL Template. 
 * @param stringSource
 * @return
 */
 boolean isTemplate(Source context) {
	Jaxp13XPathTemplate template = new Jaxp13XPathTemplate();
	template.setNamespaces(NAMESPACES);
	return template.evaluateAsBoolean("count(/xs:stylesheet)>0", context);
}
 
开发者ID:lukas-krecan,项目名称:smock,代码行数:11,代码来源:XsltUtil.java

示例7: xpathTemplate

import org.springframework.xml.xpath.Jaxp13XPathTemplate; //导入依赖的package包/类
@Bean
public Jaxp13XPathTemplate xpathTemplate(){
	return new Jaxp13XPathTemplate();
}
 
开发者ID:tigeorgia,项目名称:electionsms,代码行数:5,代码来源:AppConfig.java


注:本文中的org.springframework.xml.xpath.Jaxp13XPathTemplate类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。