/** * <p>Evaluate an XPath expression in the specified context and return the result as a <code>String</code>.</p> * * <p>This method calls {@link #evaluate(String expression, Object item, QName returnType)} with a <code>returnType</code> of * {@link XPathConstants#STRING}.</p> * * <p>See "Evaluation of XPath Expressions" of JAXP 1.3 spec * for context item evaluation, * variable, function and QName resolution and return type conversion.</p> * * <p>If a <code>null</code> value is provided for * <code>item</code>, an empty document will be used for the * context. * If <code>expression</code> is <code>null</code>, then a <code>NullPointerException</code> is thrown.</p> * * @param expression The XPath expression. * @param item The starting context (node or node list, for example). * * @return The <code>String</code> that is the result of evaluating the expression and * converting the result to a <code>String</code>. * * @throws XPathExpressionException If <code>expression</code> cannot be evaluated. * @throws NullPointerException If <code>expression</code> is <code>null</code>. */ public String evaluate(String expression, Object item) throws XPathExpressionException { return (String)this.evaluate( expression, item, XPathConstants.STRING ); }
/** * <p>Evaluate an XPath expression in the context of the specified <code>InputSource</code> * and return the result as a <code>String</code>.</p> * * <p>This method calls {@link #evaluate(String expression, InputSource source, QName returnType)} with a * <code>returnType</code> of {@link XPathConstants#STRING}.</p> * * <p>See "Evaluation of XPath Expressions" section of JAXP 1.3 spec * for context item evaluation, * variable, function and QName resolution and return type conversion.</p> * * <p>If <code>expression</code> or <code>source</code> is <code>null</code>, * then a <code>NullPointerException</code> is thrown.</p> * * @param expression The XPath expression. * @param source The <code>InputSource</code> of the document to evaluate over. * * @return The <code>String</code> that is the result of evaluating the expression and * converting the result to a <code>String</code>. * * @throws XPathExpressionException If expression cannot be evaluated. * @throws NullPointerException If <code>expression</code> or <code>source</code> is <code>null</code>. */ public String evaluate(String expression, InputSource source) throws XPathExpressionException { return (String)this.evaluate( expression, source, XPathConstants.STRING ); }
/** * <p>Evaluate an XPath expression in the context of the specified <code>InputSource</code> * and return the result as a <code>String</code>.</p> * * <p>This method calls {@link #evaluate(String expression, InputSource source, QName returnType)} with a * <code>returnType</code> of {@link XPathConstants#STRING}.</p> * * <p>See "Evaluation of XPath Expressions" section of JAXP 1.3 spec * for context item evaluation, * variable, function and QName resolution and return type conversion.</p> * * <p>If <code>expression</code> or <code>source</code> is <code>null</code>, * then a <code>NullPointerException</code> is thrown.</p> * * @param expression The XPath expression. * @param source The <code>InputSource</code> of the document to evaluate over. * * @return The <code>String</code> that is the result of evaluating the expression and * converting the result to a <code>String</code>. * * @throws XPathExpressionException If expression cannot be evaluated. * @throws NullPointerException If <code>expression</code> or <code>source</code> is <code>null</code>. */ public String evaluate(String expression, InputSource source) throws XPathExpressionException { return (String)this.evaluate( expression, source, XPathConstants.STRING ); }
/** * <p>Evaluate an XPath expression in the specified context and return the result as a <code>String</code>.</p> * * <p>This method calls {@link #evaluate(String expression, Object item, QName returnType)} with a <code>returnType</code> of * {@link XPathConstants#STRING}.</p> * * <p>See "Evaluation of XPath Expressions" of JAXP 1.3 spec * for context item evaluation, * variable, function and QName resolution and return type conversion.</p> * * <p>If a <code>null</code> value is provided for * <code>item</code>, an empty document will be used for the * context. * If <code>expression</code> is <code>null</code>, then a <code>NullPointerException</code> is thrown.</p> * * @param expression The XPath expression. * @param item The starting context (node or node list, for example). * * @return The <code>String</code> that is the result of evaluating the expression and * converting the result to a <code>String</code>. * * @throws XPathExpressionException If <code>expression</code> cannot be evaluated. * @throws NullPointerException If <code>expression</code> is <code>null</code>. */ public String evaluate(String expression, Object item) throws XPathExpressionException { return (String)this.evaluate( expression, item, XPathConstants.STRING ); }
/** * <p>Evaluate an XPath expression in the context of the specified <code>InputSource</code> * and return the result as a <code>String</code>.</p> * * <p>This method calls {@link #evaluate(String expression, InputSource source, QName returnType)} with a * <code>returnType</code> of {@link XPathConstants#STRING}.</p> * * <p>See "Evaluation of XPath Expressions" section of JAXP 1.3 spec * for context item evaluation, * variable, function and QName resolution and return type conversion.</p> * * <p>If <code>expression</code> or <code>source</code> is <code>null</code>, * then a <code>NullPointerException</code> is thrown.</p> * * @param expression The XPath expression. * @param source The <code>InputSource</code> of the document to evaluate over. * * @return The <code>String</code> that is the result of evaluating the expression and * converting the result to a <code>String</code>. * * @throws XPathExpressionException If expression cannot be evaluated. * @throws NullPointerException If <code>expression</code> or <code>source</code> is <code>null</code>. */ public String evaluate(String expression, InputSource source) throws XPathExpressionException { return (String)this.evaluate( expression, source, XPathConstants.STRING ); }
/** * <p>Evaluate an XPath expression in the context of the specified <code>InputSource</code> * and return the result as a <code>String</code>.</p> * * <p>This method calls {@link #evaluate(String expression, InputSource source, QName returnType)} with a * <code>returnType</code> of {@link XPathConstants#STRING}.</p> * * <p>See "Evaluation of XPath Expressions" section of JAXP 1.3 spec * for context item evaluation, * variable, function and QName resolution and return type conversion.</p> * * <p>If <code>expression</code> or <code>source</code> is <code>null</code>, * then a <code>NullPointerException</code> is thrown.</p> * * @param expression The XPath expression. * @param source The <code>InputSource</code> of the document to evaluate over. * * @return The <code>String</code> that is the result of evaluating the expression and * converting the result to a <code>String</code>. * * @throws XPathExpressionException If expression cannot be evaluated. * @throws NullPointerException If <code>expression</code> or <code>source</code> is <code>null</code>. */ public String evaluate(String expression, InputSource source) throws XPathExpressionException { return (String)this.evaluate( expression, source, XPathConstants.STRING ); }
/** * <p>Evaluate an XPath expression in the specified context and return the result as a <code>String</code>.</p> * * <p>This method calls {@link #evaluate(String expression, Object item, QName returnType)} with a <code>returnType</code> of * {@link XPathConstants#STRING}.</p> * * <p>See "Evaluation of XPath Expressions" of JAXP 1.3 spec * for context item evaluation, * variable, function and QName resolution and return type conversion.</p> * * <p>If a <code>null</code> value is provided for * <code>item</code>, an empty document will be used for the * context. * If <code>expression</code> is <code>null</code>, then a <code>NullPointerException</code> is thrown.</p> * * @param expression The XPath expression. * @param item The starting context (node or node list, for example). * * @return The <code>String</code> that is the result of evaluating the expression and * converting the result to a <code>String</code>. * * @throws XPathExpressionException If <code>expression</code> cannot be evaluated. * @throws NullPointerException If <code>expression</code> is <code>null</code>. */ public String evaluate(String expression, Object item) throws XPathExpressionException { return (String)this.evaluate( expression, item, XPathConstants.STRING ); }
/** * <p>Evaluate an XPath expression in the specified context and return the result as a <code>String</code>.</p> * * <p>This method calls {@link #evaluate(String expression, Object item, QName returnType)} with a <code>returnType</code> of * {@link XPathConstants#STRING}.</p> * * <p>See "Evaluation of XPath Expressions" of JAXP 1.3 spec * for context item evaluation, * variable, function and QName resolution and return type conversion.</p> * * <p>If a <code>null</code> value is provided for * <code>item</code>, an empty document will be used for the * context. * If <code>expression</code> is <code>null</code>, then a <code>NullPointerException</code> is thrown.</p> * * @param expression The XPath expression. * @param item The starting context (node or node list, for example). * * @return The <code>String</code> that is the result of evaluating the expression and * converting the result to a <code>String</code>. * * @throws XPathExpressionException If <code>expression</code> cannot be evaluated. * @throws NullPointerException If <code>expression</code> is <code>null</code>. */ public String evaluate(String expression, Object item) throws XPathExpressionException { return (String)this.evaluate( expression, item, XPathConstants.STRING ); }
/** * <p>Evaluate an XPath expression in the context of the specified <code>InputSource</code> * and return the result as a <code>String</code>.</p> * * <p>This method calls {@link #evaluate(String expression, InputSource source, QName returnType)} with a * <code>returnType</code> of {@link XPathConstants#STRING}.</p> * * <p>See "Evaluation of XPath Expressions" section of JAXP 1.3 spec * for context item evaluation, * variable, function and QName resolution and return type conversion.</p> * * <p>If <code>expression</code> or <code>source</code> is <code>null</code>, * then a <code>NullPointerException</code> is thrown.</p> * * @param expression The XPath expression. * @param source The <code>InputSource</code> of the document to evaluate over. * * @return The <code>String</code> that is the result of evaluating the expression and * converting the result to a <code>String</code>. * * @throws XPathExpressionException If expression cannot be evaluated. * @throws NullPointerException If <code>expression</code> or <code>source</code> is <code>null</code>. */ public String evaluate(String expression, InputSource source) throws XPathExpressionException { return (String)this.evaluate( expression, source, XPathConstants.STRING ); }
/** * <p>Evaluate an XPath expression in the specified context and return the result as a <code>String</code>.</p> * * <p>This method calls {@link #evaluate(String expression, Object item, QName returnType)} with a <code>returnType</code> of * {@link XPathConstants#STRING}.</p> * * <p>See "Evaluation of XPath Expressions" of JAXP 1.3 spec * for context item evaluation, * variable, function and QName resolution and return type conversion.</p> * * <p>If a <code>null</code> value is provided for * <code>item</code>, an empty document will be used for the * context. * If <code>expression</code> is <code>null</code>, then a <code>NullPointerException</code> is thrown.</p> * * @param expression The XPath expression. * @param item The starting context (node or node list, for example). * * @return The <code>String</code> that is the result of evaluating the expression and * converting the result to a <code>String</code>. * * @throws XPathExpressionException If <code>expression</code> cannot be evaluated. * @throws NullPointerException If <code>expression</code> is <code>null</code>. */ public String evaluate(String expression, Object item) throws XPathExpressionException { return (String)this.evaluate( expression, item, XPathConstants.STRING ); }