Convert XML(with document header) to CSV - If I remove the document header in XML file am able to get the expected csv output but if I don't remove the document header in XML file am not getting the expected csv output. Here is my XML
<?xml version="1.0" encoding="UTF-8"?>
<Document xmlns="urn:iso:std:iso:20022:tech:xsd:secl.010.001.03">
<SttlmOblgtnRpt>
<RptParams>
<RptId>021/ACSET/00210002/20170628/000002</RptId>
<RptDtAndTm>
<DtTm>2017-06-28T00:00:00</DtTm>
</RptDtAndTm>
</RptParams>
<Pgntn>
<PgNb>1</PgNb>
<LastPgInd>true</LastPgInd>
</Pgntn>
<ClrMmb>
<PrtryId>
<Id>00210002</Id>
<Issr>SETTLING MEMBER</Issr>
</PrtryId>
</ClrMmb>
<RptDtls>
</RptDtls>
</SttlmOblgtnRpt>
</Document>
Expected O/P:
RptId,DtTm,PgNb,LastPgInd,Id,Issr 021/ACSET/00210002/20170628/000002,2017-06-28T00:00:00,1,true,00210002,SETTLING MEMBER
Here If I remove the document header in the XML file am getting correct o/p but as per my requirement document header should be there I can't remove it. Please help me .... Thanks.