public String valueOf(Object context) { try { setNSContext(context); return xpath.stringValueOf(context); } catch (JaxenException e) { handleJaxenException(e); return ""; } }
/** * Returns the string value of the first node selected by applying the * wrapped XPath expression to the given context. * * @param context * the element to use as context for evaluating the XPath expression. * @return the string value of the first node selected by applying the * wrapped XPath expression to the given context. * @throws JDOMException * if the XPath expression is invalid or its evaluation on the * specified context failed. */ @Override public String valueOf(Object context) throws JDOMException { try { navigator.setContext(context); return xPath.stringValueOf(context); } catch (JaxenException ex1) { throw new JDOMException( "XPath error while evaluating \"" + xPath.toString() + "\": " + ex1.getMessage(), ex1); } finally { navigator.reset(); } }
public static String getNodeValue(String expression, Node node) { if (node == null) return ""; String value = null; try { XPath xpath = new DOMXPath(expression); value = xpath.stringValueOf(node); } catch (JaxenException e) { return null; } return value; }
public static String getNodeValue(String expression, Node node) { if (node == null) return ""; String value = null; try { XPath xpath = new DOMXPath(expression); value = xpath.stringValueOf(node); } catch (JaxenException e) { return null; } return value; }
public String valueOf(Object context) { try { setNSContext(context); return xpath.stringValueOf(context); } catch (JaxenException e) { handleJaxenException(e); return ""; } }
public String valueOf(Object context) { try { setNSContext(context); return xpath.stringValueOf(context); } catch (JaxenException e) { handleJaxenException(e); return ""; } }
public String valueOf(Object context) { try { setNSContext(context); return xpath.stringValueOf(context); } catch (JaxenException e) { handleJaxenException(e); return ""; } }
public String valueOf(Object context) { try { setNSContext(context); return xpath.stringValueOf(context); } catch (JaxenException e) { handleJaxenException(e); return ""; } }
public String valueOf(Object context) { try { setNSContext(context); return xpath.stringValueOf(context); } catch (JaxenException e) { handleJaxenException(e); return ""; } }
public String valueOf(Object context) { try { setNSContext(context); return xpath.stringValueOf(context); } catch (JaxenException e) { handleJaxenException(e); return ""; } }
public String valueOf(Object context) { try { setNSContext(context); return xpath.stringValueOf(context); } catch (JaxenException e) { handleJaxenException(e); return ""; } }
public String valueOf(Object context) { try { setNSContext(context); return xpath.stringValueOf(context); } catch (JaxenException e) { handleJaxenException(e); return ""; } }
public String evaluateAsString(Node node) { try { return xpath.stringValueOf(node); } catch (JaxenException ex) { throw new XPathException("Could not evaluate XPath expression [" + xpath + "] :" + ex.getMessage(), ex); } }
@Override public String evaluateAsString(Node node) { try { return xpath.stringValueOf(node); } catch (JaxenException ex) { throw new XPathException("Could not evaluate XPath expression [" + xpath + "] :" + ex.getMessage(), ex); } }
@Override public String evaluateAsString(Node node) { try { return xpath.stringValueOf(node); } catch (JaxenException ex) { throw new XPathException("Could not evaluate XPath expression [" + xpath + "] :" + ex.getMessage(), ex); } }
public String evaluateAsString(OExpression cexp, EvaluationContext ctx) throws FaultException, EvaluationException { try { return compile((OXPath10Expression) cexp).stringValueOf(createContext((OXPath10Expression) cexp, ctx)); } catch (JaxenException e) { handleJaxenException(e); } throw new AssertionError("UNREACHABLE"); }
public String valueOf(String path, Base base, Map<String, String> namespaces, Map<QName, Function> functions, Map<QName, Object> variables) throws XPathException { try { base = getElementWrapped(base); XPath xpath = getXPath(path, namespaces, functions, variables); return xpath.stringValueOf(base); } catch (JaxenException e) { throw new XPathException(e); } }
public String evaluateAsString(String expression, Source context) throws XPathException { try { XPath xpath = createXPath(expression); Element element = getRootElement(context); return xpath.stringValueOf(element); } catch (JaxenException ex) { throw new XPathException("Could not evaluate XPath expression [" + expression + "]", ex); } catch (TransformerException ex) { throw new XPathException("Could not transform context to DOM Node", ex); } }
@Override public String evaluateAsString(String expression, Source context) throws XPathException { try { XPath xpath = createXPath(expression); Element element = getRootElement(context); return xpath.stringValueOf(element); } catch (JaxenException ex) { throw new XPathException("Could not evaluate XPath expression [" + expression + "]", ex); } catch (TransformerException ex) { throw new XPathException("Could not transform context to DOM Node", ex); } }
@Override protected String evaluateToString(final String expression, @Nullable final BinderXPathVariableResolver resolver, @Nullable final Node node) throws DomBindingException { nonNullArgument(expression, "expression"); try { final org.jaxen.XPath xpath = newXPath(node, expression, resolver); return xpath.stringValueOf(node); } catch (final JaxenException e) { throw new DomBindingException(expression, e); } }