org.dom4j.Node.getUniquePath()方法的使用及代码示例

x33g5p2x  于2022-01-24 转载在 其他  
字(2.5k)|赞(0)|评价(0)|浏览(224)

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

Node.getUniquePath介绍

[英]Returns the XPath expression which will return a nodeset of one node which is the current node. This method will use the XPath index operator to restrict the path if multiple elements with the same name occur on the path.
[中]返回XPath表达式,该表达式将返回当前节点的一个节点集。如果路径上出现多个同名元素,此方法将使用XPath索引运算符来限制路径。

代码示例

代码示例来源:origin: org.rundeck/rundeck-core

  1. /**
  2. * Return a String describing the DOM node's location and parent type name
  3. *
  4. * @param e the node
  5. *
  6. * @return string describing xpath location and parent "type" element name
  7. */
  8. protected static String reportNodeErrorLocation(final Node e) {
  9. return "at xpath " + e.getUniquePath();
  10. }

代码示例来源:origin: com.googlecode.cernunnos/cernunnos

  1. private EntityConfig prepareEntryConfig(Entry n, Node d) {
  2. return prepareEntryConfig(n, d, d.getUniquePath());
  3. }

代码示例来源:origin: com.googlecode.cernunnos/cernunnos

  1. EntityConfig config = prepareEntryConfig(y, fac.createText(nested), n.getUniquePath());
  2. Phrase enclosed = (Phrase) y.getFormula().getImplementationClass().newInstance();
  3. enclosed.init(config);

代码示例来源:origin: org.jasig.portal/uPortal-layout-impl

  1. rslt = new Pathref(layoutOwnerUsername, target.getUniquePath(), fname);

代码示例来源:origin: com.googlecode.cernunnos/cernunnos

  1. .append("\n\t\tEntry Name: ").append(n.getName())
  2. .append("\n\t\tEntry Type: ").append(n.getType())
  3. .append("\n\t\tSource: ").append(d.getUniquePath() + "/" + r.getXpath())
  4. .append("\n");
  5. log.warn(msg.toString());

代码示例来源:origin: org.craftercms/crafter-core

  1. if (CollectionUtils.isNotEmpty(templateNodes)) {
  2. for (Node templateNode : templateNodes) {
  3. String templateNodePath = templateNode.getUniquePath();

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

  1. protected void testRelativePath(Element context, Node node, String pathRel,
  2. String uniquePathRel) {
  3. assertEquals("relative getPath expression should be what is expected",
  4. pathRel, node.getPath(context));
  5. assertEquals("relative getUniquePath expression not correct",
  6. uniquePathRel, node.getUniquePath(context));
  7. }

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

  1. protected void testPath(Node node, String path, String uniquePath) {
  2. assertEquals("getPath expression should be what is expected", path,
  3. node.getPath());
  4. assertEquals("getUniquePath expression should be what is expected",
  5. uniquePath, node.getUniquePath());
  6. }

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

  1. System.out.println("Position1 Xpath = " + position1.getUniquePath());
  2. System.out.println("Position2 Xpath = " + position2.getUniquePath());

相关文章