Data: Query XML with XPath

Query an XML string using XPath.

Help Centre › Functions & Formulas

Query an XML string using XPath.

Add it to a process

In the process designer, open the Add step tab. Find Query XML with XPath under Data › XML, or type its name in the search box, and drag it onto the canvas.

Fields

FieldRequiredWhat it does
XML dataYesThe data variable or XML string to process
XPath expressionYesThe XPath expression
VariableYesVariable name to store the result Default: result.

What it gives back

  • {result} – XPath query result

See all Data steps.

Errors

ErrorDescription
Invalid XMLThe data is not valid XML
XPath errorThe XPath expression is invalid

Tips

  • Use .//tag for descendant search across all levels
  • Use .//tag[@attr="val"] to filter by attributes

Related functions

Get started

See it working on your own data

Everything documented here ships with the platform – try the document tools free, or have your first automation working in 7 days.