use Test; BEGIN { plan tests => 4 } use XML::XPath; ok(1); my $xp = XML::XPath->new(ioref => *DATA); ok($xp); my @bbb = $xp->findnodes('/descendant::BBB[1]'); ok(@bbb, 1); ok($bbb[0]->string_value, "OK"); __DATA__ OK NOT OK