---
category: [Administration & Integrations, Platform and Product Extensions, Platform and Product Extensions/Integration, Administration & Integrations/Custom Integrations & Apps]
keyword: [Integrate, Workday Integration, Orchestrate for Integrations, Orchestration, Orchestration Builder]
nav: wcp_docs
parent_url: /wcp_docs/
title: >- 
  Concept: XPath Support
layout: subsection
---

<b>Functions</b>

Within orchestrations, you can apply an XPath to any XML object. If a string is XML compliant but isn't stored as an XML object, you must cast it to XML before you can apply an XPath.

The functions Orchestration Builder uses to extract values from XML documents:

-   Are type-specific.
-   Follow the same naming convention as the `JsonPath` accessor functions.
-   Are a subset of the full XPathspecification.


See [Reference: Xml Member Functions](/wcp_docs/vog1598549366757.html).

Most of Orchestration Builder's XPath functions enable you to extract the values contained in leaf nodes only. You can extract the text in a leaf element or an attribute value, but the functions return no data if an XPath selects a document fragment.

There are 3 exceptions to the leaf node-only rule. You can select document fragments with these functions:

-   `iterator`
-   `fragmentAtXPath`
-   `countItemsAtXPath`


<b>Note:</b> If a `[dataType]atXpath` function doesn't find a matching node, the orchestration fails. To avoid this scenario, you can verify that a matching node exists before attempting to extract it using a `withDefault` function variant. Example: `stringAtXpathWithDefault`.

<b>Supported XPaths</b>

This table lists the types of XPaths that Orchestration Builder supports.

<table><thead><tr><th>Description</th><th>Example</th></tr></thead><tbody><tr><td>Absolute paths.</td><td><ul><li><code>/env:Envelope/env:Body/wd:Get_Workers_Response/wd:Request_References/wd:Worker_Reference/wd:ID</code>
</li></ul></td></tr><tr><td>Index predicates.</td><td><ul><li><code>/env:Envelope/env:Body/wd:Get_Workers_Response/wd:Request_References/wd:Worker_Reference/wd:ID[1]</code>
</li></ul></td></tr><tr><td>Logical predicates involving testing attributes.</td><td><ul><li><code>/env:Envelope/env:Body/wd:Get_Workers_Response/wd:Request_References/wd:Worker_Reference/wd:ID[@wd:type='Employee_ID']</code>
</li></ul></td></tr><tr><td>Logical predicates involving testing descendant values.</td><td><ul><li><code>/env:Envelope/env:Body/wd:Get_Workers_Response/wd:Response_Data/wd:Worker/wd:Worker_Data/wd:Qualification_Data/wd:External_Job_History/wd:Job_History_Data[wd:Company='Octan Enterprises']/wd:Job_Title</code>
</li></ul></td></tr><tr><td>Logical predicates involving testing for the presence of a descendant element.</td><td><ul><li><code>/env:Envelope/env:Body/wd:Get_Workers_Response/wd:Response_Data/wd:Worker/wd:Worker_Data/wd:Personal_Data/wd:Identification_Data/wd:Custom_ID[wd:Custom_ID_Shared_Reference]</code>
</li></ul></td></tr><tr><td>Nested predicates <p><b>Note:</b> Nested index predicates aren't supported.</p></td><td><ul><li><code>/env:Envelope/env:Body/wd:Get_Workers_Response/wd:Response_Data/wd:Worker/wd:Worker_Data/wd:Personal_Data/wd:Contact_Data/wd:Phone_Data[wd:Phone_Device_Type_Reference/wd:ID[@wd:type='Phone_Device_Type_ID']='Landline']/wd:Phone_Number</code>
</li></ul></td></tr><tr><td>Wildcard operator.</td><td><ul><li><code>/*/*/wd:Get_Workers_Response/wd:Request_References/wd:Worker_Reference/wd:ID[1]</code>
</li></ul></td></tr><tr><td>All matching nodes below a node.</td><td><ul><li><code>//env:Envelope/env:Body/wd:Get_Workers_Response/wd:Response_Data/wd:Worker/wd:Worker_Data/wd:Personal_Data/wd:Name_Data/wd:Legal_Name_Data</code>
</li></ul></td></tr></tbody></table><br/>

<b>Predicate Functions</b>

You can use predicate logic to test the values of attributes. Predicates can't be nested more than 1 level deep. This table lists the predicate functions that Orchestration Builder supports.

<table><thead><tr><th>Function</th><th>Description</th></tr></thead><tbody><tr><td><code>contains</code></td><td>Arguments: <ul><li>string (String)
</li><li>substring (String)
</li></ul> Return Type: <ul><li>Boolean
</li></ul> <p>Returns <code>true</code> if string contains the specified substring.</p> <p>Examples:</p><ul><li><code>contains("foobar", "g")</code> returns <code>false</code>
</li><li><code>contains("foobar", "bar")</code> returns <code>true</code>
</li><li><code>contains("xyz asd", "xyz")</code> returns <code>true</code> for <code><wd:ID wd:type="some-type">xyz asd</wd:ID>)</code>
</li></ul></td></tr><tr><td><code>starts-with</code></td><td>Arguments: <ul><li>string (String)
</li><li>prefix (String)
</li></ul> Return Type: <ul><li>Boolean
</li></ul> Returns <code>true</code> if the first string starts with the second string. Example: <code>startsWith(@foo, "g")</code> returns <code>false</code>.</td></tr><tr><td><code>ends-with</code></td><td>Arguments: <ul><li>string (String)
</li><li>suffix (String)
</li></ul> Return Type: <ul><li>Boolean
</li></ul> Returns <code>true</code> if the first string ends with the second string. Example: <code>endsWith(@foo, "o")</code> returns <code>true</code>.</td></tr><tr><td><code>position</code></td><td>Returns the index position of the node currently being processed.</td></tr><tr><td><code>true</code></td><td>Returns <code>true</code>.</td></tr><tr><td><code>false</code></td><td>Returns <code>false</code>.</td></tr><tr><td><code>boolean</code></td><td>Returns <code>true</code> if the specified expression evaluates to true.</td></tr><tr><td><code>lang</code></td><td>Returns <code>true</code> if the current node matches the specified language code or localization.</td></tr><tr><td><code>ceiling</code></td><td>Returns the smallest integer greater than or equal to the specified decimal number.</td></tr><tr><td><code>round</code></td><td>Returns the integer nearest to the specified decimal number.</td></tr><tr><td><code>floor</code></td><td>Returns the largest integer less than or equal to the specified decimal number.</td></tr><tr><td><code>number</code></td><td>Returns a number based on the evaluation of the specified object. <p><b>Note:</b> The no-argument form isn't supported.</p></td></tr><tr><td><code>sum</code></td><td>Returns the sum of the numeric values in each node of a node set.</td></tr><tr><td><code>count</code></td><td>Returns a count of the number of nodes in a node set.</td></tr><tr><td><code>substring</code></td><td>Returns a part of the specified string starting and ending at the specified positions.</td></tr><tr><td><code>substring-before</code></td><td>Returns a part of the specified string that precedes the first occurrence of another specified string. Returns an empty string if no match is found.</td></tr><tr><td><code>substring-after</code></td><td>Returns a part of the specified string that follows the first occurrence of another specified string. Returns an empty string if no match is found.</td></tr><tr><td><code>string</code></td><td>Returns the specified value as a string. <p><b>Note:</b> The no-argument form isn't supported.</p></td></tr><tr><td><code>string-length</code></td><td>Returns the number of characters in the specified string. <p><b>Note:</b> The no-argument form isn't supported.</p></td></tr><tr><td><code>normalize-space</code></td><td>Returns the specified stripped of leading and trailing whitespace and containing sequences of whitespace characters replaced by a single space. <p><b>Note:</b> The no-argument form isn't supported.</p></td></tr><tr><td><code>text</code></td><td>Returns true if the specified text is found in the string.</td></tr></tbody></table><br/>

<b>Operators</b>

This table lists theoperatorsthat Orchestration Builder supports.

<table><thead><tr><th>Operator</th><th>Description</th></tr></thead><tbody><tr><td><code>or</code></td><td>Logical or.</td></tr><tr><td><code>and</code></td><td>Logical and.</td></tr><tr><td><code>=</code></td><td>Equals.</td></tr><tr><td><code>!=</code></td><td>Doesn't equal.</td></tr><tr><td><code>></code></td><td>Greater than.</td></tr><tr><td><code><</code></td><td>Less than.</td></tr><tr><td><code>>=</code></td><td>Greater than or equal to.</td></tr><tr><td><code><=</code></td><td>Less than or equal to.</td></tr><tr><td><code>+</code></td><td>Addition.</td></tr><tr><td><code>-</code></td><td>Subtraction.</td></tr><tr><td><code>*</code></td><td>Multiplication.</td></tr><tr><td><code>div</code></td><td>Integer div.</td></tr><tr><td><code>mod</code></td><td>Integer mod.</td></tr></tbody></table><br/>

