> ## Documentation Index
> Fetch the complete documentation index at: https://docs.apinizer.com/llms.txt
> Use this file to discover all available pages before exploring further.

# XPath Test

> You can access data on the specified path in XML data, test XPath queries, and select specific elements in XML structure

Information about how data access occurs can be learned with XPath Test examples in the **Examples** section.

<Frame caption="XPath Test">
  <img src="https://mintcdn.com/apinizer/RRMb-IlNV4OGXuzC/images/develop/test-debug-araclari/toolbox/xpath-test-1.png?fit=max&auto=format&n=RRMb-IlNV4OGXuzC&q=85&s=ad2eb7c1b9d3bd31f7a2ada1bde9108d" alt="XPath Test" width="800" height="600" data-path="images/develop/test-debug-araclari/toolbox/xpath-test-1.png" />
</Frame>

## XPath Working Logic

XPath's working logic is normally based on accessing XML elements. It works this way in XML Transformation, Content Filter, Encryption and Signature policy screens.

<Warning>
  Apinizer has made **customization** to facilitate XPATH usage in policies other than variable definition and XML Transformation, Content Filter, Encryption and Signature.
</Warning>

This customization is as follows:

<Warning>
  While normally the text value of an element can be obtained by adding the text() function to the end of the XPath path, in Apinizer the text value of XPath is obtained by default.
</Warning>

An example XML data is below.

```xml theme={null}
<?xml version="1.0" encoding="UTF-8"?>
<bookstore>
  <book category="cooking">
    <title lang="en">Everyday Italian</title>
    <author>Giada De Laurentiis</author>
    <year>2005</year>
    <price currency="EUR">30.00</price>
  </book>
  <book category="children">
    <title lang="en">Harry Potter</title>
    <author>J K. Rowling</author>
    <year>2005</year>
    <price currency="EUR">29.99</price>
  </book>
</bookstore>
```

* The following XPath is executed on this data.

```
/bookstore/book[2]/title
```

* Normally, when XPath is executed with any compiler outside Apinizer, the following result is returned.

```xml theme={null}
<title>Harry Potter</title>
```

* When executed in Apinizer XPath tool except for the specified policies, the following result is returned.

```
Harry Potter
```
