The "Stream" Style: Assignment 4
Also, lose the useless trailing newline
use XML::Parser;
my $p = new XML::Parser Style => 'stream';
parsefile $p $ARGV[0];
sub Text
{
chop if ($p->{Context}[-1] eq "v");
print;
}