123456789101112131415161718192021 use XML::Handler::Essex;use XML::SAX::Machines qw( Pipeline );my $count = 0;Pipeline( XML::Handler::Essex->new( Main => sub { while (1) { get "start-element::*"; ++$count; } }, ),)->parse_file( \*STDIN );print $count, "\n";
use XML::Handler::Essex;
use XML::SAX::Machines qw( Pipeline );
my $count = 0;
Pipeline(
XML::Handler::Essex->new(
Main => sub {
while (1) {
get "start-element::*";
++$count;
}
},
),
)->parse_file( \*STDIN );
print $count, "\n";