Koha/misc/sax_parser_test.pl
Joshua Ferraro dd3f557f53 fixing nomenclature on files in misc/, adding a few new utilities
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2007-12-30 12:13:34 -06:00

22 lines
507 B
Perl
Executable file

#!/usr/bin/perl
use XML::SAX;
my $parser = XML::SAX::ParserFactory->parser(
Handler => MySAXHandler->new
);
binmode STDOUT, ":utf8";
print "\x{65}\x{301}\n";
use Encode; $parser->parse_string(encode_utf8("<xml>\x{65}\x{301}</xml>"));
$parser->parse_string("<xml>\xEF\xBB\xBF\x{65}\x{301}</xml>");
package MySAXHandler;
use base qw(XML::SAX::Base);
sub start_document {
my ($self, $doc) = @_;
# process document start event
}
sub start_element {
my ($self, $el) = @_;
# process element start event
}