Share via


IXPathExpression.Evaluate Method

Definition

Overloads

Evaluate(Object)

Evaluate the compiled XPath expression in the specified context and return the result as a String.

Evaluate(InputSource)

Evaluate the compiled XPath expression in the context of the specified InputSource and return the result as a String.

Evaluate(Object, QName)

Evaluate the compiled XPath expression in the specified context and return the result as the specified type.

Evaluate(InputSource, QName)

Evaluate the compiled XPath expression in the context of the specified InputSource and return the result as the specified type.

Evaluate(Object)

Evaluate the compiled XPath expression in the specified context and return the result as a String.

[Android.Runtime.Register("evaluate", "(Ljava/lang/Object;)Ljava/lang/String;", "GetEvaluate_Ljava_lang_Object_Handler:Javax.Xml.Xpath.IXPathExpressionInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")]
public string? Evaluate (Java.Lang.Object? item);
[<Android.Runtime.Register("evaluate", "(Ljava/lang/Object;)Ljava/lang/String;", "GetEvaluate_Ljava_lang_Object_Handler:Javax.Xml.Xpath.IXPathExpressionInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")>]
abstract member Evaluate : Java.Lang.Object -> string

Parameters

item
Object

The starting context (node or node list, for example).

Returns

The String that is the result of evaluating the expression and converting the result to a String.

Attributes

Exceptions

If the expression cannot be evaluated.

Remarks

Evaluate the compiled XPath expression in the specified context and return the result as a String.

This method calls #evaluate(Object item, QName returnType) with a returnType of XPathConstants#STRING.

See Evaluation of XPath Expressions for context item evaluation, variable, function and QName resolution and return type conversion.

If a null value is provided for item, an empty document will be used for the context.

Java documentation for javax.xml.xpath.XPathExpression.evaluate(java.lang.Object).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to

Evaluate(InputSource)

Evaluate the compiled XPath expression in the context of the specified InputSource and return the result as a String.

[Android.Runtime.Register("evaluate", "(Lorg/xml/sax/InputSource;)Ljava/lang/String;", "GetEvaluate_Lorg_xml_sax_InputSource_Handler:Javax.Xml.Xpath.IXPathExpressionInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")]
public string? Evaluate (Org.Xml.Sax.InputSource? source);
[<Android.Runtime.Register("evaluate", "(Lorg/xml/sax/InputSource;)Ljava/lang/String;", "GetEvaluate_Lorg_xml_sax_InputSource_Handler:Javax.Xml.Xpath.IXPathExpressionInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")>]
abstract member Evaluate : Org.Xml.Sax.InputSource -> string

Parameters

source
InputSource

The InputSource of the document to evaluate over.

Returns

The String that is the result of evaluating the expression and converting the result to a String.

Attributes

Exceptions

If the expression cannot be evaluated.

If source is null.

Remarks

Evaluate the compiled XPath expression in the context of the specified InputSource and return the result as a String.

This method calls #evaluate(InputSource source, QName returnType) with a returnType of XPathConstants#STRING.

See Evaluation of XPath Expressions for context item evaluation, variable, function and QName resolution and return type conversion.

If source is null, then a NullPointerException is thrown.

Java documentation for javax.xml.xpath.XPathExpression.evaluate(org.xml.sax.InputSource).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to

Evaluate(Object, QName)

Evaluate the compiled XPath expression in the specified context and return the result as the specified type.

[Android.Runtime.Register("evaluate", "(Ljava/lang/Object;Ljavax/xml/namespace/QName;)Ljava/lang/Object;", "GetEvaluate_Ljava_lang_Object_Ljavax_xml_namespace_QName_Handler:Javax.Xml.Xpath.IXPathExpressionInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")]
public Java.Lang.Object? Evaluate (Java.Lang.Object? item, Javax.Xml.Namespace.QName? returnType);
[<Android.Runtime.Register("evaluate", "(Ljava/lang/Object;Ljavax/xml/namespace/QName;)Ljava/lang/Object;", "GetEvaluate_Ljava_lang_Object_Ljavax_xml_namespace_QName_Handler:Javax.Xml.Xpath.IXPathExpressionInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")>]
abstract member Evaluate : Java.Lang.Object * Javax.Xml.Namespace.QName -> Java.Lang.Object

Parameters

item
Object

The starting context (node or node list, for example).

returnType
QName

The desired return type.

Returns

The Object that is the result of evaluating the expression and converting the result to returnType.

Attributes

Exceptions

If the expression cannot be evaluated.

If returnType is not one of the types defined in XPathConstants.

If returnType is null.

Remarks

Evaluate the compiled XPath expression in the specified context and return the result as the specified type.

See Evaluation of XPath Expressions for context item evaluation, variable, function and QName resolution and return type conversion.

If returnType is not one of the types defined in XPathConstants, then an IllegalArgumentException is thrown.

If a null value is provided for item, an empty document will be used for the context. If returnType is null, then a NullPointerException is thrown.

Java documentation for javax.xml.xpath.XPathExpression.evaluate(java.lang.Object, javax.xml.namespace.QName).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to

Evaluate(InputSource, QName)

Evaluate the compiled XPath expression in the context of the specified InputSource and return the result as the specified type.

[Android.Runtime.Register("evaluate", "(Lorg/xml/sax/InputSource;Ljavax/xml/namespace/QName;)Ljava/lang/Object;", "GetEvaluate_Lorg_xml_sax_InputSource_Ljavax_xml_namespace_QName_Handler:Javax.Xml.Xpath.IXPathExpressionInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")]
public Java.Lang.Object? Evaluate (Org.Xml.Sax.InputSource? source, Javax.Xml.Namespace.QName? returnType);
[<Android.Runtime.Register("evaluate", "(Lorg/xml/sax/InputSource;Ljavax/xml/namespace/QName;)Ljava/lang/Object;", "GetEvaluate_Lorg_xml_sax_InputSource_Ljavax_xml_namespace_QName_Handler:Javax.Xml.Xpath.IXPathExpressionInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")>]
abstract member Evaluate : Org.Xml.Sax.InputSource * Javax.Xml.Namespace.QName -> Java.Lang.Object

Parameters

source
InputSource

The InputSource of the document to evaluate over.

returnType
QName

The desired return type.

Returns

The Object that is the result of evaluating the expression and converting the result to returnType.

Attributes

Exceptions

If the expression cannot be evaluated.

If returnType is not one of the types defined in XPathConstants.

If source or returnType is null.

Remarks

Evaluate the compiled XPath expression in the context of the specified InputSource and return the result as the specified type.

This method builds a data model for the InputSource and calls #evaluate(Object item, QName returnType) on the resulting document object.

See Evaluation of XPath Expressions for context item evaluation, variable, function and QName resolution and return type conversion.

If returnType is not one of the types defined in XPathConstants, then an IllegalArgumentException is thrown.

If source or returnType is null, then a NullPointerException is thrown.

Java documentation for javax.xml.xpath.XPathExpression.evaluate(org.xml.sax.InputSource, javax.xml.namespace.QName).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to