Skip to content

XML Set Value

Type: xml-set-value  ·  Package: XML Activities v1.0.0  ·  Output: string

Change the text value of the first element that matches an XPath and return the modified XML. Use it to update data in an XML document: a status, a date, an amount.

Locates the first element that matches xpath in xml, puts the new value in it, and returns the complete modified XML (as a string). Remember to save the result with Write XML.

ParameterEditorDescription
xmlexpressionThe XML text.
xpathexpressionXPath to the element to update.
valueexpressionThe new value.

Ninguno.

Returns a string with the modified XML.

Read XML path = = ruta → output: xml
XML Set Value xml = = xml xpath = "//Factura/Estado" value = "Pagada" → output: xmlNuevo
Write XML path = = ruta content = = xmlNuevo