Dear All,
I have one log file and it contains lot of XML as below.
<methodCall><methodName>RefillTRequest</methodName><params><param><value><struct><member><name>originNodeType</name><value><string>EXT</string></value></member><member><name>originHostName</name><value><string>ABC_SRV01</string></value></member><member><name>originTransactionID</name><value><string>
12345678998765432100</string></value></member><member><name>originTimeStamp</name><value><dateTime.iso8601>20110517T00:00:19+0400</dateTime.iso8601></value></member><member><name>subscriberNumber</name><value><string>
123456789123</string></value></member><member><name>transactionAmountRefill</name><value><string>
3150</string></value></member><member><name>transactionCurrency</name><value><string>DHS</string></value></member><member><name>paymentProfileID</name><value><string>
ABC</string></value></member><member><name>externalData1</name><value><string>Service</string></value></member></struct></value></param></params></methodCall>
<methodCall><methodName>RefillTRequest</methodName><params><param><value><struct><member><name>originNodeType</name><value><string>EXT</string></value></member><member><name>originHostName</name><value><string>ABC_SRV01</string></value></member><member><name>originTransactionID</name><value><string>
11223344556677889911</string></value></member><member><name>originTimeStamp</name><value><dateTime.iso8601>20110517T00:00:48+0400</dateTime.iso8601></value></member><member><name>subscriberNumber</name><value><string>
987654321987</string></value></member><member><name>transactionAmountRefill</name><value><string>
5250</string></value></member><member><name>transactionCurrency</name><value><string>DHS</string></value></member><member><name>paymentProfileID</name><value><string>
ABC</string></value></member><member><name>externalData1</name><value><string>Service</string></value></member></struct></value></param></params></methodCall>
I want to generates CSV from above XML. CSV is as below.
|
MSISDN,Transaction ID ,Amount,Profile ID |
123456789123,12345678998765432100,3150,ABC |
987654321987,11223344556677889911,5250,ABC |