use XML::Simple; my $data = join '', ; my $ref = XMLin($data);