Perl simple XML parsing

Use XML::Simple
This is the most simple XML example.

Example

use strict;
use warnings;
use XML::Simple;

my $xml = XML::Simple->new;
my  $str = "<result><status>Success</status><easyId>1234</easyId></result>";
my $data = eval {$xml->XMLin($str)};
if($@) { die "Form is wrong" };        # Error Handling
# Error
print "Easy ID :" . $data->{"easyId"} . "\n";

If you want to parse more complicated XML, you should switch to the other way to parse.