in reply to xpath query
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
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: xpath query
by ikegami (Patriarch) on Dec 27, 2011 at 11:13 UTC | |
|
Re^2: xpath query
by mojo-jojo (Novice) on Dec 28, 2011 at 06:03 UTC | |
by mojo-jojo (Novice) on Dec 28, 2011 at 10:27 UTC |