I've a mysql table with the header of an invoice. These data are enough to create my xml output file.
The structure of the output file must be:
<?xml version="1.0" encoding="ISO-8859-1" ?>
<bpxml>
<invoices>
<invoice>
<number>1</number>
<date>01/01/2016</date>
<amount>100</amount>
<tax>20</tax>
<customer>
<name>Customer name</name>
<taxcode>tax code123</taxcode>
</customer>
</invoice>
<invoice>...</invoice>
</invoices>
</bpxml>
I created mysql input connection, xml output and I mapped all fields. All works fine but I've only two problems:
- Create invoices parent element
- Create customer parent element
It seems not simple to add these container elements to the output xml file.
The source mysql table contains all data in flat manner, so I've these columns:
number|date|amount|tax|customer_name|customer_taxcode
Also using parent xml element and row xml element I'm able only to manage <bpxml>
and <invoice>
element but I'm not able to add <invoices>
container element and <customer>
container element.
There is a simple way to add these container elements to the final stream?