Split and create array

Hi @xewonder, I am afraid I am not entirely sure what you mean by XML JSON. Are you just trying to wrap XML data inside the existing n8n JSON structure? That’s what the XML node would do, so make sure to check that out.

You’d still need a little bit of code to convert multiple n8n items into a single n8n item. Here’s an example workflow doing the below:

  1. Get some dummy data using the HTTP Request + Item Lists nodes
  2. Convert all incoming items into the line_items property of a single new item respecting n8n’s data structure using the Function node
  3. Convert our data into an XML structure using the XML node
  4. Create a binary file using the Move Binary Data node

You can then download the XML file generated by this workflow or automatically process it like any other binary file in n8n.