[Omaha.pm] longest xpath ever?
Jay Hannah
jhannah at omnihotels.com
Tue Feb 3 12:27:14 PST 2009
Do I win the award? :)
j
$ cat j.pl
use XML::Twig;
my $twig=XML::Twig->new();
$twig->parsefile('j.xml');
my $root = $twig->root;
my @x = $root->get_xpath('soap:Body/AvailabilityResponse/AvailResponseSegments/a:AvailResponseSegment/a:RoomStayList/hc:RoomStay/hc:RatePlans/hc:RatePlan/hc:AdditionalDetails/hc:AdditionalDetail[@detailType="GuaranteePolicy"]/hc:AdditionalDetailDescription/hc:Text');
print $x[0]->text . "\n";
$ perl j.pl
Guarantee is mandatory to reserve room,AX,DC,DS,JC,MC,VI
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.pm.org/pipermail/omaha-pm/attachments/20090203/3155f61a/attachment.html>
More information about the Omaha-pm
mailing list