XPATH_RETURN_TYPES

Type: Object

The possible values of the returnType prop in the FxXPath component.

These values are exposed on the FxXPath component

Static properties

Name Type Description
ANY_TYPE Number

Returns the result of the query, can be anything depending on the query

BOOLEAN_TYPE Number

Resolves to true or false, uses the effective boolean value to determine the result. count(1) resolves to true, count(()) resolves to false

FIRST_NODE Number

Resolves to the first node XPATH_RETURN_TYPES.NODES_TYPE would have resolved to.

NODES_TYPE Number

Resolve to all nodes the FxXPath resolves to. Returns nodes in the order the FxXPath would. Meaning (//a, //b) resolves to all A nodes, followed by all B nodes. //*[self::a or self::b] resolves to A and B nodes in document order.

NUMBER_TYPE Number

Resolve to a number, like count((1,2,3)) resolves to 3.

NUMBERS_TYPE Number

Resolve to an array of numbers

STRING_TYPE Number

Resolve to a string, like //someElement[1] resolves to the text content of the first someElement

STRINGS_TYPE Number

Resolve to an array of strings

Was this page helpful?