Search Predicates

An XPath expression can have a search predicate. The search predicate is used to locate a specific element of a repeating schema item. For example, a $GetOrderInformation/OrderDetails/OrderItem item is a repeating element. If you wish to select only the first item in the repeating element, you would specify the following:

$GetOrderInformation/OrderDetails/OrderItem[1]

The [1] specifies the first element of a repeating item.

Sub-items can also be examined and used in a search predicate. For example, to select the element whose ProductId is equal to "3A54", you would specify the following:

$GetOrderInformation/OrderDetails/OrderItem[ProductId="3A54"]

You can also use functions and expressions in the search predicate. For example, if you wish to find all elements after the first, you would specify the following:

$GetOrderInformation/OrderDetails/OrderItem[position()>1]

See the Functions tab of the XPath Formula Builder for a list of available functions available and online documentation.