# XPathQuery

Required Frends version: 5.5+

Required .NET version: 6.0

Compatible Agents: Crossplatform

Source code: <https://github.com/FrendsPlatform/Frends.CrossplatformXML>

{% tabs %}
{% tab title="Parameter: Input" %}

| Name                  | Description                                                                                          |
| --------------------- | ---------------------------------------------------------------------------------------------------- |
| XML : `String`        | <p>XML to be queried.</p><p><br>Default: <code>-</code><br>Example:<code>Everyday Italian</code></p> |
| XPathQuery : `String` | <p>The XPath Query</p><p><br>Default: <code>-</code><br>Example: <code>/book/title/text()</code></p> |
| {% endtab %}          |                                                                                                      |

{% tab title="Parameter: Options" %}

| Name                                          | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| --------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| ThrowErrorOnEmptyResults : `Boolean`          | <p>Throw an exception if no results returned by query</p><p><br>Default: <code>true</code><br>Example: <code>true</code></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
| XPathVersion : `XPathVersion`                 | <p>XPath Query language version. Version 1.0 is not supported.</p><p>V31 = 3.1</p><p>V30 = 3.0</p><p>V20 = 2.0</p><p>Possible values:</p><ul><li><code>V31</code>:</li></ul><p>XPath Query language version. Version 1.0 is not supported.</p><p>V31 = 3.1</p><p>V30 = 3.0</p><p>V20 = 2.0</p><ul><li><code>V30</code>:</li></ul><p>XPath Query language version. Version 1.0 is not supported.</p><p>V31 = 3.1</p><p>V30 = 3.0</p><p>V20 = 2.0</p><ul><li><code>V20</code>:</li></ul><p>XPath Query language version. Version 1.0 is not supported.</p><p>V31 = 3.1</p><p>V30 = 3.0</p><p>V20 = 2.0</p><p><br>Default: <code>0</code><br>Example: <code>XPathVersion.V31</code></p> |
| ReturnRawXmlForNonAtomicValues : `Boolean`    | <p>Enables the Task to return the raw xml values for non atomic values.</p><p><br>Default: <code>False</code><br>Example: <code>true</code></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| SchemaAware : `Boolean`                       | <p>Enable schema aware processing.</p><p><br>Default: <code>False</code><br>Example: <code>true</code></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| SchemaValidationMode : `SchemaValidationMode` | <p>Schema validation mode.</p><p>Possible values:</p><ul><li><code>None</code>:</li></ul><p>Schema validation mode.</p><ul><li><code>Lax</code>:</li></ul><p>Schema validation mode.</p><ul><li><code>Strict</code>:</li></ul><p>Schema validation mode.</p><p><br>Default: <code>0</code><br>Example: <code>SchemaValidationMode.None</code></p>                                                                                                                                                                                                                                                                                                                                    |
| EnableExternalEntities : `Boolean`            | <p>Controls whether external entities are allowed in the XML processing.</p><p><br>Default: <code>-</code><br>Example: <code>false</code></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| {% endtab %}                                  |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |

{% tab title="Result: Result" %}

| Name            | Description                                                                                              |
| --------------- | -------------------------------------------------------------------------------------------------------- |
| Data : `Object` | <p>Data of the query.<br>Example: <code>\[ "value123", 546, true, { "someObject": "hello" } ]</code></p> |
| {% endtab %}    |                                                                                                          |
| {% endtabs %}   |                                                                                                          |
