> 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/rpa-studio/file/xml/delete-xml-element.md).

# Delete Element

Deletes XML 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
