I'm looking for the easiest way to quickly get data from an XML structure using XPath queries in Perl.
The following code structure explains what I would like to achieve:
my $xml_data = "<foo><elementName>data_to_retrieve</elementName></foo>"; my $xpath_query = "//elementName"; my $result_of_query = ... what goes here? ... die unless ($result_of_query eq 'data_to_retrieve');
TIMTOWTDI is obviously applied, but what would be the easiest way to do this?
knorv source share