# Delete Element

This activity deletes a specific XML element from the given XML

### Input

* **Input:** [`String Argument`](/getting-started/rpa-studio/arguments.md#string) <mark style="color:red;">`Required`</mark>\
  Input the XML.
* **Location:** [`String Argument`](/getting-started/rpa-studio/arguments.md#string) <mark style="color:red;">`Required`</mark>\
  Input the location of the element to be deleted.
* **Index:** [`Integer Argument`](/getting-started/rpa-studio/arguments.md#string)\
  Specifies the index from which the element is to be deleted. Used with Mode **`AtIndex`**.
* **Mode:**\
  Select the method where the element is to be deleted. These are the available options.
  * `First(default)` - Deletes the first occurrence of a specified XML element
  * `AtIndex` - Deletes the occurrence of the specified XML element at the specified index.
  * `All` - Deletes all the occurrences of the specified XML element.

### Output

* **Result:** [`String Variable`](/getting-started/rpa-studio/variables.md#string)\
  Stores the updated the XML after the element deletion in the specified [String ](/getting-started/rpa-studio/variables.md#string)variable


---

# Agent Instructions: 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:

```
GET https://docs.visualyze.ai/rpa-studio/file/xml/delete-xml-element.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
