5859606162636465
for (int i = 0; i < result.length; i++) { result[i] = nodes.item(i); } return result; } catch (XPathExpressionException e) { throw new XPathEvaluationException(node, xpath, e); } }
6970717273747576
throws XPathEvaluationException { try { return (String) xPathFactory.newXPath().evaluate(xpath, node, XPathConstants.STRING); } catch (XPathExpressionException e) { throw new XPathEvaluationException(node, xpath, e); } }
64656667686970717273
public String getText(Object node, String xpath) throws XPathEvaluationException { List<Node> nodes = doGetNodes(node, xpath); if (nodes.size() == 0) { throw new XPathEvaluationException(node, xpath); } return nodes.get(0).getValue().trim(); }