The expression returns a XML::LibXML::NodeList referencing a single XML::LibXML::Element representing the first dependency element.find(use XML::LibXML qw(); XML::LibXML ->load_xml(string => <<'XML')->find('//dependency[not(version)]'); <project> <dependency> <!-- find all such dependency tags --> <groupId>com.solarmetric</groupId> <artifactId>kodo-jdo-runtime</artifactId> </dependency> <dependency> <groupId>javax.jdo</groupId> <artifactId>jdo</artifactId> <version>1.0.2</version> </dependency> </project> XML
In reply to Re: xpath query
by Anonymous Monk
in thread xpath query
by mojo-jojo
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |