#!/usr/bin/perl --
use strict; use warnings;
use XML::Twig;
my $str = <<'EOF';
<NoTe>
<To>
<Person>Satan</Person>
</To>
<Beef><SaUsAGe>is Tasty</SaUsAGe></Beef>
</NoTe>
EOF
{
my $t = XML::Twig->new(
pretty_print => 'indented',
force_end_tag_handlers_usage => 1,
start_tag_handlers => { _all_ => sub { $_->set_tag( lc $_->ta
+g ); return }, },
end_tag_handlers => { _all_ => sub { $_->set_tag( lc $_->tag
+); return }, },
);
$t->parse($str);
$t->flush();
}
__END__
(Faced XPath feature being case-insensitive)
Why is this a problem? |