Write XML
Write XML
Section titled “Write XML”Type: xml-write · Package: XML Activities v1.0.0 · Output: string
Saves XML text to a file. It is the last step after modifying an XML with XML Set Value or XML Add Element. Returns the written path.
How it works
Section titled “How it works”Write content to the path file. By default it formats the XML with indentation (indent = true) to make it readable.
Required parameters
Section titled “Required parameters”| Parameter | Editor | Description |
|---|---|---|
path | expression | Path of the file to write. |
content | expression | The XML text to save. |
Optional parameters
Section titled “Optional parameters”| Parameter | Editor | Description |
|---|---|---|
encoding | text | Coding. By default "utf-8". |
indent | boolean | Format with indentation. By default true. |
Output
Section titled “Output”Returns a string with the file path written.
Example
Section titled “Example”Read XML path = = ruta → output: xmlXML Set Value xml = = xml xpath = "//Estado" value = "Procesado" → output: xmlNuevoWrite XML path = = "C:/salida/factura.xml" content = = xmlNuevoRelated activities
Section titled “Related activities”- Read XML — read an XML file.
- XML Set Value / XML Add Element — modificar antes de guardar.