The issue is just that - the @ is being interpreted as a global symbol and it should behave as a XPATH symbol signifying the attribute.
my $query = "/nvd/entry[@id = $cve_id]"; my $xp = XML::XPath-> new(filename => "$data_file"); foreach my $cve_entry ($xp->findnodes($query)) { }
In reply to Re^3: XPath query issue...
by spstansbury
in thread XPath query issue...
by spstansbury
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |