XML::Parser 

my $parser = XML::Parser->new(
    Handlers => {
        Start => \&handle_start,
        Char  => \&handle_char
    }
);

$parser->parsefile($filename);

sub handle_start {
    my($parser, $name, %attr) = @_;
}

sub handle_char {
    my($parser, $chars) = @_;
}