- 使用 Spring Initializr 创建 Spring Boot 应用程序
- 在Spring Boot中配置Cassandra
- 在 Spring Boot 上配置 Tomcat 连接池
- 将Camel消息路由到嵌入WildFly的Artemis上
本文整理了Java中org.codehaus.cargo.util.XmlUtils.selectElementsMatchingXPath()
方法的一些代码示例,展示了XmlUtils.selectElementsMatchingXPath()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。XmlUtils.selectElementsMatchingXPath()
方法的具体详情如下:
包路径:org.codehaus.cargo.util.XmlUtils
类名称:XmlUtils
方法名:selectElementsMatchingXPath
[英]The following will search the given element for the specified XPath and return a list of nodes that match.
[中]下面将在给定元素中搜索指定的XPath,并返回匹配的节点列表。
代码示例来源:origin: org.codehaus.cargo/cargo-core-container-weblogic
/**
* this will select the node(s) that match the below deployment.
*
* @param deployable what to search for
* @param domain root element to search in
* @return list of child elements that match the deployment
*/
protected List<Element> selectAppDeployments(Deployable deployable, Element domain)
{
String xpath =
"//weblogic:app-deployment[weblogic:name/text()='"
+ createIdForDeployable(deployable) + "']";
Element toSearch = domain;
return xmlTool.selectElementsMatchingXPath(xpath, toSearch);
}
代码示例来源:origin: codehaus-cargo/cargo
/**
* this will select the node(s) that match the below deployment.
*
* @param deployable what to search for
* @param domain root element to search in
* @return list of child elements that match the deployment
*/
protected List<Element> selectAppDeployments(Deployable deployable, Element domain)
{
String xpath =
"//weblogic:app-deployment[weblogic:name/text()='"
+ createIdForDeployable(deployable) + "']";
Element toSearch = domain;
return xmlTool.selectElementsMatchingXPath(xpath, toSearch);
}
代码示例来源:origin: org.codehaus.cargo/cargo-core-api-util
/**
* The following will search the given element for the specified XPath and return any node that
* matches.
*
* @param xpath - selection criteria
* @param toSearch - element to start the search at
* @return a matching element
*/
public Element selectElementMatchingXPath(String xpath, Element toSearch)
{
List<Element> results = selectElementsMatchingXPath(xpath, toSearch);
if (results.isEmpty())
{
throw new ElementNotFoundException(xpath, toSearch);
}
Element match = results.get(0);
return match;
}
代码示例来源:origin: codehaus-cargo/cargo
/**
* The following will search the given element for the specified XPath and return any node that
* matches.
*
* @param xpath - selection criteria
* @param toSearch - element to start the search at
* @return a matching element
*/
public Element selectElementMatchingXPath(String xpath, Element toSearch)
{
List<Element> results = selectElementsMatchingXPath(xpath, toSearch);
if (results.isEmpty())
{
throw new ElementNotFoundException(xpath, toSearch);
}
Element match = results.get(0);
return match;
}
代码示例来源:origin: org.codehaus.cargo/cargo-core-container-weblogic
xmlTool.selectElementsMatchingXPath("weblogic:app-deployment", domain);
for (Element appDeployment : appDeployments)
代码示例来源:origin: codehaus-cargo/cargo
xmlTool.selectElementsMatchingXPath("weblogic:app-deployment", domain);
for (Element appDeployment : appDeployments)
代码示例来源:origin: org.codehaus.cargo/cargo-core-container-weblogic
/**
* {@inheritDoc} undeploys files by removing their configuration to the config.xml file of the
* WebLogic server.
*/
@Override
public void undeploy(Deployable deployable)
{
XmlUtils xmlUtil = new XmlUtils(getFileHandler());
Document configXml =
xmlUtil.loadXmlFromFile(getFileHandler().append(getDomainHome(), "config.xml"));
List<Element> results = xmlUtil.selectElementsMatchingXPath("//Application[@Path='"
+ getFileHandler().getParent(getAbsolutePath(deployable)) + "']",
configXml.getDocumentElement());
for (Element element : results)
{
configXml.removeChild(element);
}
this.writeConfigXml(configXml);
}
代码示例来源:origin: codehaus-cargo/cargo
/**
* {@inheritDoc} undeploys files by removing their configuration to the config.xml file of the
* WebLogic server.
*/
@Override
public void undeploy(Deployable deployable)
{
XmlUtils xmlUtil = new XmlUtils(getFileHandler());
Document configXml =
xmlUtil.loadXmlFromFile(getFileHandler().append(getDomainHome(), "config.xml"));
List<Element> results = xmlUtil.selectElementsMatchingXPath("//Application[@Path='"
+ getFileHandler().getParent(getAbsolutePath(deployable)) + "']",
configXml.getDocumentElement());
for (Element element : results)
{
configXml.removeChild(element);
}
this.writeConfigXml(configXml);
}
本文整理了Java中org.codehaus.cargo.util.XmlUtils.selectElementsMatchingXPath()方法的一些代码示例,展示了XmlUtils.select
我是一名优秀的程序员,十分优秀!