I have a script that send sms for a trigger using a sms gateway. The command to send sms used is curl as below:
It get reply as an xml format as below:
<?xml version='1.0' encoding='ISO-8859-1' ?><REPLY><PARAMETER>OK</PARAMETER><LOGIN>SUCCESSFULL</LOGIN><PUSHAPI>ACTIVE</PUSHAPI><STAKEHOLDERID>OK</STAKEHOLDERID><PERMITTED>OK</PERMITTED><SMSINFO><MSISDN>xxxxxxxxxxxxx</MSISDN><SMSTEXT>Test+SMS+Check</SMSTEXT><CSMSID>123456789</CSMSID><REFERENCEID>2020050321383271896124009</REFERENCEID></SMSINFO></REPLY>
Now I want to track the count and list of sms sent for billing issue. That's why I need to convert the output xml response to either a text file or a csv or a xlx file that will append each response to a line and count total number of sent sms.