Data: Set XML element value

Set the text/value of an XML element.

Help Centre › Functions & Formulas

Set the text/value of an XML element.

Add it to a process

In the process designer, open the Add step tab. Find Set XML element value 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 to target elementsYesThe XPath expression
New text valueYesThe value to set at the specified path
VariableYesVariable name to store the result Default: data.

What it gives back

  • {data} – Modified XML string

See all Data steps.

Errors

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

Tips

  • Sets the text content of all matching elements
  • Use specific XPath expressions to target individual elements

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.