I’m new to xslt and want to use it to just write out a flat file from the xml input below.
I also need a line feed after each parent segment
So this:
<?xml version="1.0" encoding="UTF-8"?>
<ns0:test xmlns:ns0="urn:mynamespace.com:test">
<Header>
<OderId>9876</OderId>
<CustomerNo>Cust123</CustomerNo>
<Item>
<Product>N1234565</Product>
<SubItem>
<DelDate>20220601</DelDate>
<Quantity>10</Quantity>
</SubItem>
<SubItem>
<DelDate>20220602</DelDate>
<Quantity>5</Quantity>
</SubItem>
</Item>
<Item>
<Product>N54321</Product>
<SubItem>
<DelDate>20220701</DelDate>
<Quantity>3</Quantity>
</SubItem>
<SubItem>
<DelDate>20220702</DelDate>
<Quantity>17</Quantity>
</SubItem>
</Item>
</Header>
</ns0:test>
Needs to produce this:
9876Cust123
N1234565
2022060110
202206025
N54321
202207013
2022070217
I’ll have way more fields than that but need to just write out everything within each parent and don’t want to specify each and every field.
Thanks Richard