DATA FORMAT Query XML function

The DATA FORMAT Query XML function in RPA.

Help CentreFunctions & Formulas

This article describes the RPA Data Format functionality to query values from XML data.

For a full list of available functions, please read DATA FORMAT functions.


Description

The Query XML function retrieves values from XML data using XPath expressions. Returns an array of matching elements.


Setting it up

To use the Query XML function, follow these instructions:

{{popups:rpas/add:action=xml-query}}

Once on a process map:

  1. Navigate to the process where you would like to add the Query XML function
  2. Click on the green button’s drop-down (right side of the green button labelled “Process”)
  3. On the menu that appears, click on the “+ Activity” item
  4. From here you can select the DATA FORMAT Query XML option
  5. Click "Add" once you are done

Input parameters

ParameterRequiredTypeDefaultDescription
DataYesText-The XML string to query
XPathYesText-The XPath expression to evaluate
VariableNoTextresultVariable name to store the result

Output variables

VariableTypeDescription
{result}ArrayArray of matching XML elements or values

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

See it working on your own data

Everything documented here ships with the platform – try the document tools free, or go live in 7 days.