> For the complete documentation index, see [llms.txt](https://docs.visualyze.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.visualyze.ai/getting-started/rpa-studio/editor-windows/xpath-helper.md).

# XPath Helper

The XPath Helper window allows the user to evaluate an XPath on a given XML string.

The XPath Helper contains the following sections:

* XPath Expression
* XPath Element selector
* XPath Attribute Selector
* XPath Input
* Result
* Error list\ <br>

  <figure><img src="/files/SR0RGmff2WWL32KbSdjz" alt=""><figcaption><p>XPath Helper Window</p></figcaption></figure>

**XPath Expression:** \
&#x20;XPath expressions are used to select nodes or sets of nodes in an XML input. Think of XPath expressions as similar to the paths you navigate in a computer file system. By following a path or steps, you can select specific nodes. In this section, you can enter your XPath expression.

The node is selected by following a path or steps. The most useful path expressions are listed below:<br>

| Expression | Description                                                                                           |
| ---------- | ----------------------------------------------------------------------------------------------------- |
| *nodename* | Selects all the nodes with the name "*nodename*"                                                      |
| /          | Selects from the root node                                                                            |
| //         | Selects nodes in the document from the current node that match the selection no matter where they are |
| .          | Selects the current node                                                                              |
| ..         | Selects the parent of the current node                                                                |
| @          | Selects the attributes                                                                                |

####

Some sample path expressions and their result are provided below.

| Path Expression | Result                                                                                                                                                          |
| --------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| catalog         | Selects all nodes with the name "catalog"                                                                                                                       |
| /catalog        | <p>Selects the root element catalog</p><p><strong>Note:</strong> If the path starts with a slash ( / ) it always represents an absolute path to an element!</p> |
| catalog/book    | Selects all book elements that are children of catalog                                                                                                          |
| //book          | Selects all book elements no matter where they are in the document                                                                                              |
| catalog//book   | Selects all book elements that are descendant of the bookstore element, no matter where they are under the bookstore element                                    |
| //@id           | Selects all attributes that are named id                                                                                                                        |

**XPath Input:** \
This field is where you enter the XPath expression you want to evaluate on the provided XML string. It serves as the basis for selecting elements or attributes within the XML.\ <br>

<figure><img src="/files/2oC0BlSzeGYhxpOStARv" alt=""><figcaption><p>XPath Input</p></figcaption></figure>

**XPath Element Selector:**\
&#x20;Once you provide an XPath input, the XPath Element Selector section will populate with a list of elements present in the XML. You can select individual elements from this list. This helps you choose the specific elements you want to target with your XPath expression.

**XPath Attribute Selector:** \
Similarly, when you enter an XPath input, the XPath Attribute Selector section will display the attributes of the selected element, if any attributes exist. This allows you to select attributes associated with the chosen element.<br>

<figure><img src="/files/LIzKDoJ6YhGOitICiJav" alt=""><figcaption><p>XPath Document Selector</p></figcaption></figure>

**Result:** \
The Result section displays the output or evaluated result of the XPath expression on the given XML string. It shows the nodes or node sets that match the XPath expression you provided.

<figure><img src="/files/EQGQO3R2xOLlwVAytEOu" alt=""><figcaption><p>The output listing of all the book elements in the Xml input</p></figcaption></figure>

**Error List:**\
The Error List section displays the errors that occurred due to the given xml input. It shows the line and description of the specific errors in the Xml input section.\ <br>

<figure><img src="/files/OvSsz8sZFRnLRxQkQgrk" alt=""><figcaption><p>Error listing in the Xml input</p></figcaption></figure>

By using XPath expressions, you can effectively navigate and select specific elements or attributes within an XML structure. The XPath Helper window simplifies this process by providing an interface for evaluating XPath expressions and displaying the resulting output.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.visualyze.ai/getting-started/rpa-studio/editor-windows/xpath-helper.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
