I got the error message when $t string variable includes a colon ":" and when it does not include colon the script work fine. How could I escape from this error. Thanks.my @nodes = $doc->findnodes("/feed/doc/title[text( )=$t]/ancestor::fee +d/doc/abstract/text( )"); foreach my $node (@nodes) { #print $node->data, "\n"; print $t2, ": ", $node->firstChild->data, "\n\n"; }
Motaz
In reply to xpath invalid expression by mksaad
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |