Use XML::Simple - Easy API to maintain XML (esp config files) or see XML::Twig - A perl module for processing huge XML documents in tree mode.
Example like:
use strict;use warnings;use XML::Simple;use Data::Dumper;my $xml = q~<xml><date><date1>2012-10-22</date1><date2>2012-10-23</date2></date></xml>~;print $xml,$/;my $data = XMLin($xml);print Dumper( $data );my @dates;foreach my $attributes (keys %{$data->{date}}){ push(@dates, $data->{date}{$attributes})}print Dumper(\@dates);
Output:
$VAR1 = ['2012-10-23','2012-10-22' ];