The 3 most common handlers are:
- Start - the begin-tag
- End - the end-tag
- Char - character data
use strict; use XML::Parser; my $parser = new XML::Parser(Handlers => {Start => \&handle_start, End => \&handle_end, Char => \&handle_char}); my $file = shift; $parser->parsefile($file); sub handle_start { } sub handle_end { } sub handle_char { }