Help for this page
<?xml version="1.0"?> <doc> <!-- <elt show="NOK1"> --> <!-- comment + --> ... <elt att=" show NOK5"/> <!-- use attribute na +me in value --> <elt odd=">" att="ok5"/> <!-- use > in attribu +te value --> </doc>
#!/usr/bin/perl -w use strict; ... my $t= XML::Twig->new( start_tag_handlers => { $path => sub { print $_ +[0]->original_string, "\n"; }}); $t->parsefile( shift @ARGV);