Am trying to create an XSLT to convert XML to CSV. Here am placing my XML and expected output anyone have any idea how to get the below output please share me on priority.
The following stylesheet will produce the expected result (minus some formatting issues) from the given example. Whether that's the logic you want to apply in general is not clear.
XSLT 1.0
SttlmOblgtnId,Pmt,Id,Cd,Dt,Unit,Amt,Desc,Cd,RltdSttlmOblgtnId,SttlmDt,SctiesMvmntTp,Pmt,Unit,Amt
,
,
,
,
,
,
,
,
,
,
,
,
,
,,,,,,,,,
,
,
,
,
Result:
SttlmOblgtnId,Pmt,Id,Cd,Dt,Unit,Amt,Desc,Cd,RltdSttlmOblgtnId,SttlmDt,SctiesMvmntTp,Pmt,Unit,Amt
A,Fail,SETTLE,CO,2011-11-11,11,20.00,SA,PR,Debit,2011-11-11,INDIA,MT,22.00
,,,,,,,,,Outward,2015-12-01,UK,EMP,100.00
B,Ok,UNSETTLE,MM,2012-12-12,22,60.00,RB,IM,Credit,2012-12-12,DELHI,AP,66.00
,,,,,,,,,Value,2001-05-05,US,PASS,666.00