/** * 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(); }
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);
String commonXPath = table.getCommonXpath(); NodeList result = (NodeList) xpath.evaluate(commonXPath, doc, XPathConstants.NODESET); int rowOffset = table.getStartCellReference().getRow() + table.getHeaderRowCount();
/** * 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; }
/** * 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(); }
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);
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);
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
String commonXPath = table.getCommonXpath(); NodeList result = (NodeList) xpath.evaluate(commonXPath, doc, XPathConstants.NODESET); int rowOffset = table.getStartCellReference().getRow() + table.getHeaderRowCount();