#!/usr/bin/perl use XML::Trivial; use strict; use warnings; foreach my $hostelm (XML::Trivial::parseFile('file.xml')->{0}->ea) { foreach ($hostelm->ea) { print "Host: ".$hostelm->en." Process: ".$_->ah('name')."\n" if $_->en eq 'process'; } }
In reply to Re: Parsing XML w/ Attributes
by pajout
in thread Parsing XML w/ Attributes
by jpk236
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |