I have a current XML file as shown below.
<INVOICES>
<INVOICE>
<HEADER>
<DocumentID>001500113139_1260538</DocumentID>
<DocumentID>001500113138_1262778</DocumentID>
<DocumentID>001500113137_1262762</DocumentID>
<DocumentID>001500113136_1260522</DocumentID>
</HEADER>
</INVOICE>
</INVOICES>
This has to be transformed to the below format using XSLT.
<Batches>
<Batch ID="20141119">
<Documents>
<Document ID= 001500113139_1260538 />
<Document ID= 001500113138_1262778 />
<Document ID= 001500113137_1262762 />
<Document ID= 001500113136_1260522 />
</Documents>
</Batch>
</Batches>
How to map the Xml elements to attributes. Could anyone suggest please.
Thanks in advance.
No comments:
Post a Comment