XML::SAX::SimpleDispatcher dispatches subroutine calls based on a XPath like path. This can be handy tweaking children nodes data while parsing data by SAX parser.
SYNOPSIS
use XML::SAX::SimpleDispatcher;
use XML::SAX::ParserFactory;
my $stash;
my $handler = XML::SAX::SimpleDispatcher->new(
process => {
'/Books/Book' => [ sub { push @$stash, $_[0]}, ['Title'] ],
}
);
my $parser = XML::SAX::ParserFactory->parser(Handler => $handler);
$parser->parse_string('< Books >< Book >< Title >Learning Perl< /Title >< /Book >< /Books >');
## And then, $stash has a list of context inside of 'Title' tag
Product's homepage
Requirements:
· Perl