develooper Front page | perl.beginners | Postings from May 2007

Parsing XML data

From:
Mike Blezien
Date:
May 21, 2007 13:27
Subject:
Parsing XML data
Message ID:
000301c79be5$039ebfe0$04fea8c0@DGGTPQ11
Hello,

I am working with a XML gateway system which sends back response results in XML 
format. I have been trying to work w/XML::Simple to parse the data, but not too 
much success. This is a sample of the XML response data, the "*" indicate the 
data we need to extract from XML file. I tried used Data::Dumper to help, but 
didn't get the results I though, any help would be much appreciated as the best 
way to parse this data.

----------------------------------------------------------------------------------
<EdentifyResponse>
  *<responsetype>success</responsetype>
 *<code>100</code>
  *<message></message>
  *<transactionid>de7556e-4875-8da1-26521e504ec9</transactionid>
  <response>
    <idalertresponse>
      *<fullname>John Smith</fullname>
      *<last4ssn>1234</last4ssn>
      *<locator>LOCATOR</locator>
      *<datecreated>DATECREATED</datecreated>
      *<lastscandate>LASTSCANDATE</lastscandate>
      *<riskrating>RISKRATING</riskrating>
      *<confirms>CONFIRMS</confirms>
      *<chg_confirms>CHG_CONFIRMS</chg_confirms>
      *<suspects>SUSPECTS</suspects>
      *<chg_suspects>CHG_SUSPECTS</chg_suspects>
      *<surnamematch>SURNAMEMATCH</surnamematch>
      *<chg_surnamematch>CHG_SURNAMEMATCH</chg_surnamematch>
      *<differentsurname>DIFFERENTSURNAME</differentsurname>
      *<chg_differentsurname>CHG_DIFFERENTSURNAME</chg_differentsurname>
      *<ssnmatchonly>SSSMATCHONLY</ssnmatchonly>
      *<chg_ssnmatchonly>CHG_SSNMATCHONLY</chg_ssnmatchonly>
      *<riskindicators>RISHKINDICATORS</riskindicators>
    </idalertresponse>
  </response>
</EdentifyResponse>
-------------------------------------------------------------------------------


Mike(mickalo)Blezien
===============================
Thunder Rain Internet Publishing
=============================== 




nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About