> For the complete documentation index, see [llms.txt](https://docs.avoautomation.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.avoautomation.com/avo-assure/actions/generic/xml-and-json-operations/get-xml-block-data.md).

# Get XML Block Data

The Get XML Block Data action in the Avo Assure is found under the @Generic Element is used to retrieve XML data from a specified block, based on the provided block XPath and save the result in the given output variable.

### **Syntax**

**Input:** `<Filepath >;<block xpath>`

{% hint style="info" %}
**Note:** The tag which user want to find or store in output that user need to mention as block xpath.
{% endhint %}

**Output:** `<Dynamic Variable>;<Dynamic Variable>(Optional)`

<figure><img src="https://2174257472-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fk8QZzXZMIJSStKAzDSTu%2Fuploads%2FoefNOdpeTrxGgNQDfJVU%2Fimage.png?alt=media&amp;token=5ab08707-e866-4e9e-994a-85b536f8c9f4" alt=""><figcaption></figcaption></figure>

### **Usecase/Example**

<figure><img src="https://2174257472-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fk8QZzXZMIJSStKAzDSTu%2Fuploads%2F3LDrwYRCeSQu5mqCCL4Z%2Fimage.png?alt=media&amp;token=5295ad2d-1af8-4281-9e90-340bfd348088" alt=""><figcaption></figcaption></figure>

### **Scenario**

A transportation provider receives shipping data in XML format, containing blocks of information such as sender details, package contents, and delivery dates. During testing, the Avo Assure tool uses the specified XPath to retrieve data from the “name” block. This allows testers to confirm that each package name in the XML file is accurate. By automatically extracting data from the specified block, they ensure the tracking system displays correct information without requiring manual checks of each XML file.

### **Input**

Provide the correct input as shown below:

C:\Docs\xml1.xml;\<name>

**XML Data:**

The user must provide the name of the block they want to check.

```
<widget>
<debug>on</debug>
<window title="Sample Konfabulator Widget">
                   <name>main_window</name>
       <width>500</width>
       <height>500</height>
</window>     
</widget>
```

### **Expected Result**

It should display the \<name> block content specified in the input value.

### **Output**

The result of Get XML Block Data action is stored in the {result} output variable as\[‘\<name>main\_window\</name>’], which can be utilized for display or other purposes.


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.avoautomation.com/avo-assure/actions/generic/xml-and-json-operations/get-xml-block-data.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
