Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
<?xml version = "1.0"?> <response> <custid>101010101</custid> <status>success</status> <responsecode>11</responsecode> <kf></kf> <cn>1111222233334444555</cn> <neta>7.00</neta> <prid>X111111111111111</prid> <ano>22222222</ano> <trxid>33333333</trxid> <description>Transfer Completed</description> </response>
%_xml_response_data = ( 'custid' => "101010101", 'status' => "success", 'responsecode' => "11", 'kf' => "", 'cn' => "1111222233334444555", 'neta' => "7.00", 'prid' => "X111111111111111", 'ano' => "22222222", 'trxid' => "33333333", 'description' => "Transfer Completed", );
if($_xml_response_data{status} eq "success") { # True so do whatever... } else { # false so do whatever else... }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: parsing a simple xml response
by BrowserUk (Patriarch) on Jul 07, 2010 at 02:12 UTC | |
|
Re: parsing a simple xml response
by toolic (Bishop) on Jul 07, 2010 at 02:12 UTC | |
|
Re: parsing a simple xml response
by ikegami (Patriarch) on Jul 07, 2010 at 02:36 UTC | |
by BrowserUk (Patriarch) on Jul 07, 2010 at 07:39 UTC | |
by ikegami (Patriarch) on Jul 07, 2010 at 15:36 UTC | |
|
Re: parsing a simple xml response
by Anonymous Monk on Jul 07, 2010 at 02:07 UTC |