org.dom4j.Element.getXPathResult()方法的使用及代码示例

x33g5p2x  于2022-01-18 转载在 其他  
字(1.9k)|赞(0)|评价(0)|浏览(321)

本文整理了Java中org.dom4j.Element.getXPathResult()方法的一些代码示例,展示了Element.getXPathResult()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Element.getXPathResult()方法的具体详情如下:
包路径:org.dom4j.Element
类名称:Element
方法名:getXPathResult

Element.getXPathResult介绍

[英]Returns a node at the given index suitable for an XPath result set. This means the resulting Node will either be null or it will support the parent relationship.
[中]返回给定索引处适合XPath结果集的节点。这意味着结果节点要么为null,要么支持父关系。

代码示例

代码示例来源:origin: jboss.jboss-embeddable-ejb3/hibernate-all

public Node getXPathResult(int i) {
  return element.getXPathResult( i );
}

代码示例来源:origin: org.hibernate/com.springsource.org.hibernate.core

public Node getXPathResult(int i) {
  return element.getXPathResult( i );
}

代码示例来源:origin: org.hibernate/com.springsource.org.hibernate

public Node getXPathResult(int i) {
  return element.getXPathResult( i );
}

代码示例来源:origin: hibernate/hibernate

public Node getXPathResult(int i) {
  return element.getXPathResult( i );
}

代码示例来源:origin: org.hibernate/com.springsource.org.hibernate

public Node getXPathResult(int i) {
  return target().getXPathResult( i );
}

代码示例来源:origin: org.hibernate/com.springsource.org.hibernate.core

public Node getXPathResult(int i) {
  return target().getXPathResult( i );
}

代码示例来源:origin: hibernate/hibernate

public Node getXPathResult(int i) {
  return target().getXPathResult( i );
}

代码示例来源:origin: jboss.jboss-embeddable-ejb3/hibernate-all

public Node getXPathResult(int i) {
  return target().getXPathResult( i );
}

代码示例来源:origin: dom4j/dom4j

public void testGetXPathNode() throws Exception {
  Element root = document.getRootElement();
  assertNotNull("Has root element", root);
  int count = root.nodeCount();
  assertTrue("Root has correct node count", count == 2);
  boolean iterated = false;
  for (int i = 0; i < count; i++) {
    Node node = root.getXPathResult(i);
    assertNotNull("Valid node returned from node()", node);
    assertTrue("Node supports the parent relationship", node.supportsParent());
    iterated = true;
  }
  assertTrue("Iteration completed", iterated);
}

相关文章

Element类方法