Hierarchical xml export

Is it possible to create an hierarchical xml export from my order and orderlines tables with order_id as a link between the tables?.
Need to export this from my Wappler site for import into a bigger system

Hello Olav,

You can export any data with the xml exprot tool. So, you can create a db query/join and export what you need from it.

Created a query where i Joined my order and orderline table. The xml export works fine, but there are only 2 levels. root:export and Item.
I would like to have the orderlines on level 3. It would give a more correct export to use when this is to be impotred into two tables in the bigger system.

Se image, the select har all orderline fields at the end, query returns them mixed with order-head fields. Orderline fields with red mark.
Any reason for this?

Created an export in Visual Studio which produce this output from the same tables, see image.
Am I wrong thinking this is the best structure for an xml file when importing data into two tables from one export file. Don’t want to make a fool out of my self when contacting the technical staff of this bigger system and ask them to create an import.:sweat_smile:
Not able to see that this is possible in Wappler you can only create 2 levels, root and item.