evaluateAsBoolean

Evaluates the given expression as a boolean. Returns the boolean evaluation of the expression, or
false if it is invalid.

The return value is determined per the boolean() function defined in the XPath specification.
This means that an expression that selects zero nodes will return false, while an expression that
selects one or more nodes will return true.
An expression that returns a string returns false for empty strings and true for all other
strings.
An expression that returns a number returns false for zero and true for non-zero numbers.

evaluateAsDouble

Evaluates the given expression as a double. Returns the evaluation of the expression, or Double.NaN if it is invalid.

The return value is determined per the number() function as defined in the XPath specification.
This means that if the expression selects multiple nodes, it will return the number value of the first node.

evaluateAsString

Evaluates the given expression as a String. Returns the evaluation of the expression, or
null if it is invalid.

The return value is determined per the string() function as defined in the XPath specification.
This means that if the expression selects multiple nodes, it will return the string value of the first node.