###
sub find {
my ($self, $path, $ret, $prev, $seekArray,$ref)=@_; my (@arr,$seekPName);
- foreach my $name(split(/\//, $path)){
+ foreach my $name(split(/\//, $path)){ next if !$name;
if($name eq '*'){
#return \@arr if @arr; # The path instructs to return an array, which is set but return is set to single only found element.
# foreach my $itm(@arr){
>div>
>div>
<text<Shallow>text>
+
+ attribute = "attribute value"
+
>parent>
));
$test -> subcase("Select all text nodes in parent.")->
evaluate("\$find2[/parent/*/text]",3,scalar @$find2);
$test -> evaluate("\$find2[/parent/*/text]",'Shallow', $find2->[2]->val());
+ $test -> subcase("Find and return value of attribute.");
+ my $find3 = $node->find('/parent/attribute');
+ $test -> evaluate("[/parent/attribute]",'attribute value', $find3);
#
$test -> nextCase();