gpt4 book ai didi

org.apache.poi.xssf.usermodel.XSSFTable.getCommonXpath()方法的使用及代码示例

转载 作者:知者 更新时间:2024-03-18 05:30:40 27 4
gpt4 key购买 nike

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

XSSFTable.getCommonXpath介绍

[英]Calculates the xpath of the root element for the table. This will be the common part of all the mapping's xpaths Note: this function caches the result for performance. To flush the cache #updateHeaders() must be called.
[中]计算表的根元素的xpath。这将是所有映射XPath的公共部分注意:此函数缓存结果以提高性能。要刷新缓存,必须调用#updateHeaders()。

代码示例

代码示例来源:origin: org.apache.poi/poi-ooxml

/**
 * If the XPath is, for example, /Node1/Node2/Node3 and /Node1/Node2 is the common XPath for the table, the local XPath is /Node3
 * 
 * @return the local XPath
 */
public String getLocalXPath() {
  StringBuilder localXPath = new StringBuilder();
  int numberOfCommonXPathAxis = table.getCommonXpath().split("/").length-1;
  String[] xPathTokens = ctXmlColumnPr.getXpath().split("/");
  for (int i = numberOfCommonXPathAxis; i < xPathTokens.length; i++) {
    localXPath.append("/" + xPathTokens[i]);
  }
  return localXPath.toString();
}

代码示例来源:origin: org.apache.poi/poi-ooxml

String commonXPath = table.getCommonXpath();
xpaths.add(commonXPath);
tableMappings.put(commonXPath, table);
      XSSFRow row = sheet.getRow(i);
      Node tableRootNode = getNodeByXPath(table.getCommonXpath(), doc.getFirstChild(), doc, true);

代码示例来源:origin: org.apache.poi/poi-ooxml

String commonXPath = table.getCommonXpath();
NodeList result = (NodeList) xpath.evaluate(commonXPath, doc, XPathConstants.NODESET);
int rowOffset = table.getStartCellReference().getRow() + table.getHeaderRowCount();

代码示例来源:origin: org.openl.rules/org.openl.lib.poi.dev

/**
 * If the XPath is, for example, /Node1/Node2/Node3 and /Node1/Node2 is the common XPath for the table, the local XPath is /Node3
 *     
 * @return the local XPath 
 */
public String getLocalXPath(){
  String localXPath = "";
  int numberOfCommonXPathAxis = table.getCommonXpath().split("/").length-1;
  
  String[] xPathTokens = ctXmlColumnPr.getXpath().split("/");
  for(int i=numberOfCommonXPathAxis; i<xPathTokens.length;i++){
    localXPath += "/" +xPathTokens[i];
  }
  return localXPath;
}

代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.poi

/**
 * If the XPath is, for example, /Node1/Node2/Node3 and /Node1/Node2 is the common XPath for the table, the local XPath is /Node3
 * 
 * @return the local XPath
 */
public String getLocalXPath() {
  StringBuilder localXPath = new StringBuilder();
  int numberOfCommonXPathAxis = table.getCommonXpath().split("/").length-1;
  String[] xPathTokens = ctXmlColumnPr.getXpath().split("/");
  for (int i = numberOfCommonXPathAxis; i < xPathTokens.length; i++) {
    localXPath.append("/" + xPathTokens[i]);
  }
  return localXPath.toString();
}

代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.poi

String commonXPath = table.getCommonXpath();
xpaths.add(commonXPath);
tableMappings.put(commonXPath, table);
      XSSFRow row = sheet.getRow(i);
      Node tableRootNode = getNodeByXPath(table.getCommonXpath(), doc.getFirstChild(), doc, true);

代码示例来源:origin: org.openl.rules/org.openl.lib.poi.dev

String commonXPath = table.getCommonXpath();
xpaths.add(commonXPath);
tableMappings.put(commonXPath, table);
      XSSFRow row = sheet.getRow(i);
      Node tableRootNode = getNodeByXPath(table.getCommonXpath(),doc.getFirstChild(),doc,true);

代码示例来源:origin: org.openl.rules/org.openl.lib.poi.dev

String commonXPath = table.getCommonXpath();
NodeList result = (NodeList) xpath.evaluate(commonXPath, doc, XPathConstants.NODESET);
int rowOffset = table.getStartCellReference().getRow() + 1;// the first row contains the table header

代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.poi

String commonXPath = table.getCommonXpath();
NodeList result = (NodeList) xpath.evaluate(commonXPath, doc, XPathConstants.NODESET);
int rowOffset = table.getStartCellReference().getRow() + table.getHeaderRowCount();

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com