use lib ("..",".","blib/lib","../blib/lib"); use XML::Traverse::ParseTree; use XML::Parser; use Data::Dumper; #use Test::More qw(no_plan);; use Test::More tests => 4; $xml = <<'_XML_';
text HalloollaH A text with some more markup
_XML_ my $p = XML::Parser->new(Style => "Tree"); my $r = $p->parse($xml); my $h = XML::Traverse::ParseTree->new(); # print Dumper($r); *id = $h->getter('@id'); my $i = $h->dfs_iterator($r,"sub1"); is(id($i->()),"1"); is(id($i->()),"2"); is(id($i->()),"3"); is(id($i->()),"4"); 1;