in reply to Re: Problem handling array from XML stream
in thread Problem handling array from XML stream
In the interests of TIMTOWTDI, I wrote up an XPath version of your script:
use XML::LibXML; my $xml = XML::LibXML->new->parse_file('example.xml'); for my $status ($xml->findnodes('//Status')) { print join( ':', $status->findvalue('parent::Program/@NAME'), $status->findvalue('StatusDesc'), $status->findvalue('StatusDate'), $status->findvalue('StatusEndDate') ), "\n"; }
|
---|
In Section
Seekers of Perl Wisdom