#!/usr/bin/perl use strict; use warnings; use XML::Twig; use v5.10; my $twig = XML::Twig->new(); $twig->parsefile( 'CC.xml'); my $looking_for_day = 'Tuesday'; foreach my $node ($twig->get_xpath('//Day[@day_of_week="' . $looking_f +or_day . '"]/Times/Time')) { say $node->att('start-time'); }
In reply to Re: Extracting XML data from a tree
by Neighbour
in thread Extracting XML data from a tree
by perlvroom
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |