This fails as no nodes are found. When manually walking through the tree I see that the namespace using $doc->firstChild->nameSpaceURI. How do I add the found name space, so that the XPATH query gives the wanted result - I guess that Sketchpath handles this automatically. The XML look like this <?xml version="1.0" encoding ="UTF-8"?><xxx xmlns="http://xxx><yyy>zzz</yyy></xxx> The query is a simple /xxx/yyy (sorry - missed this when simplyfying the xml.my $parser=XML::LibXML->new(); my $doc=$parser->parse_file($file); foreach my $node($doc->findnodes($xpathQuery));
In reply to XML::Lib XML question by weismat
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |