本文整理了Java中com.jcabi.xml.XML.nodes()
方法的一些代码示例,展示了XML.nodes()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。XML.nodes()
方法的具体详情如下:
包路径:com.jcabi.xml.XML
类名称:XML
方法名:nodes
[英]Retrieve DOM nodes from the XML response.
The List returned will throw IndexOutOfBoundsExceptionif you try to access a node which wasn't found by this XPath query.
An IllegalArgumentException is thrown if the parameter passed is not a valid XPath expression.
[中]从XML响应中检索DOM节点。
如果试图访问此XPath查询未找到的节点,则返回的列表将抛出IndexOutofBoundsException。
如果传递的参数不是有效的XPath表达式,则会引发IllegalArgumentException。
代码示例来源:origin: jcabi/jcabi-github
@Override
public Notification get(final int number) {
try {
return new MkNotification(
this.storage.xml().nodes(
this.xpath.concat(String.format("[id = %s]", number))
).get(0)
);
} catch (final IOException ex) {
throw new IllegalStateException(ex);
}
}
代码示例来源:origin: jcabi/jcabi-github
@Override
public boolean exists(final String path, final String ref)
throws IOException {
return this.storage.xml().nodes(
String.format("%s/content[path='%s']", this.xpath(), path)
).size() > 0;
}
代码示例来源:origin: jcabi/jcabi-github
@Override
public JsonObject json() throws IOException {
return new JsonNode(
this.storage.xml().nodes(this.xpath()).get(0)
).json();
}
代码示例来源:origin: jcabi/jcabi-github
@Override
public JsonObject json() throws IOException {
return new JsonNode(
this.storage.xml().nodes(this.xpath()).get(0)
).json();
}
代码示例来源:origin: jcabi/jcabi-github
@Override
public JsonObject json() throws IOException {
return new JsonNode(
this.storage.xml().nodes(this.xpath()).get(0)
).json();
}
代码示例来源:origin: jcabi/jcabi-github
@Override
public JsonObject json() throws IOException {
return new JsonNode(
this.storage.xml().nodes(this.xpath()).get(0)
).json();
}
代码示例来源:origin: jcabi/jcabi-github
@Override
public JsonObject json() throws IOException {
return new JsonNode(
this.storage.xml().nodes(this.xpath()).get(0)
).json();
}
代码示例来源:origin: jcabi/jcabi-github
@Override
public JsonObject json() throws IOException {
return new JsonNode(
this.storage.xml().nodes(this.xpath()).get(0)
).json();
}
代码示例来源:origin: jcabi/jcabi-github
@Override
public JsonObject json() throws IOException {
return new JsonNode(
this.storage.xml().nodes(this.xpath()).get(0)
).json();
}
代码示例来源:origin: jcabi/jcabi-github
@Override
public JsonObject json() throws IOException {
return new JsonNode(
this.storage.xml().nodes(this.xpath()).get(0)
).json();
}
代码示例来源:origin: jcabi/jcabi-github
@Override
public JsonObject json() throws IOException {
return new JsonNode(
this.storage.xml().nodes(this.xpath()).get(0)
).json();
}
代码示例来源:origin: jcabi/jcabi-github
@Override
public JsonObject json() throws IOException {
return new JsonNode(
this.storage.xml().nodes(this.xpath()).get(0)
).json();
}
代码示例来源:origin: jcabi/jcabi-github
@Override
public JsonObject json() throws IOException {
return new JsonNode(
this.storage.xml().nodes(this.xpath()).get(0)
).json();
}
代码示例来源:origin: jcabi/jcabi-github
@Override
public JsonObject json() throws IOException {
return new JsonNode(
this.storage.xml().nodes(this.xpath()).get(0)
).json();
}
代码示例来源:origin: jcabi/jcabi-github
@Override
public JsonObject json() throws IOException {
return new JsonNode(
this.storage.xml().nodes(this.xpath()).get(0)
).json();
}
代码示例来源:origin: jcabi/jcabi-github
@Override
public JsonObject json() throws IOException {
return new JsonNode(
this.storage.xml().nodes(this.xpath()).get(0)
).json();
}
代码示例来源:origin: jcabi/jcabi-github
@Override
public JsonObject json() throws IOException {
return new JsonNode(
this.storage.xml().nodes(this.xpath()).get(0)
).json();
}
代码示例来源:origin: jcabi/jcabi-github
@Override
public JsonObject json() throws IOException {
return new JsonNode(
this.storage.xml().nodes(this.xpath()).get(0)
).json();
}
代码示例来源:origin: jcabi/jcabi-github
@Override
public JsonObject json() throws IOException {
return new JsonNode(
this.storage.xml().nodes(
String.format(
"/github/repos/repo[@coords='%s']/commits/commit[sha='%s']",
this.repo().coordinates(), this.hash
)
).get(0)
).json();
}
代码示例来源:origin: jcabi/jcabi-github
@Override
public JsonObject json() throws IOException {
return new JsonNode(
this.storage.xml().nodes(
String.format(
"//repo[@coords='%s']/hooks/hook[id='%s']",
this.repo().coordinates(), this.number()
)
).get(0)
).json();
}
}
内容来源于网络,如有侵权,请联系作者删除!