how to write the content as text file in OIC
Content
Hi
I need to write a csv file which will have variable number of columns.
Source file is xml file which contains different tags with variable delimited content
<REC_1>1,466051581,466051581,,,,,,,,,,,,,,,,,,,,END,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,</REC_1>
<REC_5>6,466051581-300000002080452,4,125,,,300000002080457,151026,SEK,Corporate,,,,,,,,,466051581,151026,00:00:00,,111112233403,,,,,125,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,END</REC_5>
I need to convert this into csv. Since the file will have variable number of columns, i could not come up with an structure. How ever i can write this into a single column ..but then all these information will confine into a single column. Rather i want the information contained in delimiter , should be put into a separate column .
So the solution should be write the information present between xml tags as it is in a text file with an extension of csv. Then if we open the csv (Excel), the content within delimiter (,) will be positioned in separate columns.