Create 2 XML files: with and without XML attributes

Nodes

c26ee7ea-e01b-42ad-8f48-355916f8914cfc075733-bb58-455a-b659-2f0182342273

Created by

n8n8n Team

Last edited 38 days ago

This workflow demonstrates two ways of exporting data from SQL to XML.

First, several random records are received from the MySQL database.

Then, in the upper part of the workflow, the structure of an XML is defined in the Set node. After that, the ItemLists node combines all items into an array. This allows an XML node to create a simple XML file.

The lower part of the workflow shows how to create an XML with attributes. It is almost identical except that a $ (dollar sign) JSON key is used to define XML attributes.

Finally, both files are saved locally.

New to n8n?

Need help building new n8n workflows? Process automation for you or your company will save you time and money, and it's completely free!