File: perlsax-test.pl

package info (click to toggle)
libxml-perl 0.08-4
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 488 kB
  • sloc: perl: 1,961; xml: 301; sh: 31; makefile: 2
file content (13 lines) | stat: -rw-r--r-- 270 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
use XML::Parser::PerlSAX;
use XML::Handler::Sample;

if ($#ARGV != 0) {
    die "usage: esis-test FILE\n";
}
$file = shift @ARGV;

$my_handler = XML::Handler::Sample->new;

XML::Parser::PerlSAX->new->parse(Source => { SystemId => $file },
				 Handler => $my_handler);