xpathField.setNamespaceURIs( data.NAMESPACE ); if ( xmlDataField.getResultType() == GetXMLDataField.RESULT_TYPE_VALUE_OF ) { nodevalue = xpathField.valueOf( node ); } else {
public String valueOf(String xpathExpression) { XPath xpath = createXPath(xpathExpression); return xpath.valueOf(this); }
public Object getValue(Object row) { switch (type) { case STRING_TYPE: return xpath.valueOf(row); case NUMBER_TYPE: return xpath.numberValueOf(row); case NODE_TYPE: return xpath.selectSingleNode(row); default: return xpath.evaluate(row); } }
/** * Selects the value of the given XPath. * * @param xpathExpression the xpath * * @return the value or <code>null</code> if no match */ public String valueOf(String xpathExpression) { XPath xpath = createXPath(xpathExpression); return xpath.valueOf(node); }
public Object getValue(Object row) { switch (type) { case STRING_TYPE: return xpath.valueOf(row); case NUMBER_TYPE: return xpath.numberValueOf(row); case NODE_TYPE: return xpath.selectSingleNode(row); default: return xpath.evaluate(row); } }
public Object getValue(Object row) { switch (type) { case STRING_TYPE: return xpath.valueOf(row); case NUMBER_TYPE: return xpath.numberValueOf(row); case NODE_TYPE: return xpath.selectSingleNode(row); default: return xpath.evaluate(row); } }
public Object getValue(Object row) { switch (type) { case STRING_TYPE: return xpath.valueOf(row); case NUMBER_TYPE: return xpath.numberValueOf(row); case NODE_TYPE: return xpath.selectSingleNode(row); default: return xpath.evaluate(row); } }
public Object getValue(Object row) { switch (type) { case STRING_TYPE: return xpath.valueOf(row); case NUMBER_TYPE: return xpath.numberValueOf(row); case NODE_TYPE: return xpath.selectSingleNode(row); default: return xpath.evaluate(row); } }
public Object getValue(Object row) { switch (type) { case STRING_TYPE: return xpath.valueOf(row); case NUMBER_TYPE: return xpath.numberValueOf(row); case NODE_TYPE: return xpath.selectSingleNode(row); default: return xpath.evaluate(row); } }
public Object getValue(Object row) { switch (type) { case STRING_TYPE: return xpath.valueOf(row); case NUMBER_TYPE: return xpath.numberValueOf(row); case NODE_TYPE: return xpath.selectSingleNode(row); default: return xpath.evaluate(row); } }
public Object getValue(Object row) { switch (type) { case STRING_TYPE: return xpath.valueOf(row); case NUMBER_TYPE: return xpath.numberValueOf(row); case NODE_TYPE: return xpath.selectSingleNode(row); default: return xpath.evaluate(row); } }
protected void testXPath(Node node, String xpathExpr) throws Exception { try { XPath xpath = node.createXPath(xpathExpr); String value = xpath.valueOf(node); log("valueOf: " + xpathExpr + " is: " + value); } catch (Throwable e) { e.printStackTrace(); assertTrue("Failed with exception: " + e, false); } } }