use XML::Simple; my($xmlstring)=<>; my($xmlObj)=XML::Simple->new(noattr=>1); my($dataref)=$xmlObj->XMLin($xmlstring);