HI ,
I have flat file in the below format and problem is that I want a format where ‘5188311’ will be parent node and will display the all child nodes until the number ‘5188311’ is not changed. once the number changes to ‘5188312’ it should create a new parent node and again child nodes . This process repeats until the end of the flat file
5188311|100286114|CN01-09-500006275|-200.000|03/02/2009|CNP
5188311|100286114|EN01-09-500006275|200.000|03/02/2009|CNP
5188311|100286114|MN01-09-500006275|200.000|03/02/2009|CNP
5188312|100286114|MN01-09-500006275|200.000|03/02/2009|CNP
The XML output should be similar as shown below:
<receiptNumber>100256906-1736</receiptNumber>
<invoiceList>
– <invoice>
<invoiceNumber>CN01-09-500006275</invoiceNumber>
<amountPaid>200.0</amountPaid>
</invoice>
– <invoice>
<invoiceNumber>EN01-09-500006275</invoiceNumber>
<amountPaid>200.0</amountPaid>
</invoice>
<invoice>
<invoiceNumber>MN01-09-500006275</invoiceNumber>
<amountPaid>200.0</amountPaid>
</invoice>
</invoiceList>
<paymentDate>203/02/2009</paymentDate>
<paymentSource>CNP</paymentSource>
If any one had faced that problem please let me know.
Thanks
MD