use strict;
use XML::Twig;
my $sel = 'title';
my $ign = 'title/name/fnm[@letter="a"]';
my $twig = XML::Twig->new(
ignore_elts => { "$ign" => 1},
twig_roots => { "$sel" => 1},
pretty_print => 'indented'
);
$twig->parsefile('1.xml');
$twig->print;
####
testingHouston, Carl6920.13.42.814
testingHouston, Allan6920.13.42.814
testign
Houston
Bob
49
testing the sub title in title
this is pcdata in subtitle
second sub level
This is a test
####
testingHouston, Carl6920.13.42.814
testign
Houston
Beb49
testing the sub title in title
this is pcdata in subtitle
second sub level
####
testingHouston, Carl6920.13.42.814
testingHouston, 6920.13.42.814
testign
Houston
Beb49
testing the sub title in title
this is pcdata in subtitle
second sub level