# FILTERXML Function

> Return data from XML text with an XPath query using FILTERXML in TX Sheet Control: vertical arrays of matches, numeric values and the #VALUE! error cases.

- **Product:** TX Sheet Control
- **Section:** Documentation
- **Kind:** Function
- **Path:** TX Sheet Control > API Reference > Formula Functions > FILTERXML Function
- **211 words**
- **Web URL:** https://docs.textcontrol.com/tx-sheet-control/reference/formula-functions/filterxml/
- **LLMs URL:** https://docs.textcontrol.com/tx-sheet-control/reference/formula-functions/filterxml/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-sheet-control/reference/formula-functions/filterxml/llms-full.txt

---

Return data from XML text with an XPath query. `xml` is the XML text and `xpath` the XPath expression; several matching nodes are returned as a vertical array, and numeric content is returned as numbers. Invalid XML, an invalid XPath or an XPath without a match returns `#VALUE!`.

### Syntax

```text
FILTERXML(xml, xpath)
```

Category: Web. Minimum arguments: 2. Maximum arguments: 2.

Available for supported offline calculation.

### Examples

```text
=FILTERXML("<r><v>2</v><v>3</v></r>","//v")
```

The formula returns the array {2;3}, the values of both v elements.

Cell and range examples require appropriate input values in the referenced cells. Handle invalid arguments, formula errors and array and spill constraints.

### See Also

- [Formulas](https://docs.textcontrol.com/tx-sheet-control/spreadsheets/formulas/llms-full.txt)
- [Custom Functions and Formula Data](https://docs.textcontrol.com/tx-sheet-control/spreadsheets/custom-functions/llms-full.txt)

---

## Nearby

- **Previous:** [FILTER Function](https://docs.textcontrol.com/tx-sheet-control/reference/formula-functions/filter/llms-full.txt)
- **Next:** [FIND Function](https://docs.textcontrol.com/tx-sheet-control/reference/formula-functions/find/llms-full.txt)
