Or you could just use XML::Simple. Borrowing from toolic's example:
use strict; use warnings; use XML::Simple; my $xfile = <<EOF; <people> <person><name>Jane Doe</name><age>42</age></person> <person><name>John Doe</name><age>43</age></person> <person><name>Foo Bar</name><age>43</age></person> </people> EOF my $people = XMLin($xfile); foreach (keys %{$people->{person}}) { my $person = $people->{person}->{$_}; next if $person->{age} != 43; print "$_ is $person->{age}\n"; } __END__ John Doe is 43 Foo Bar is 43
In reply to Re: I want to find a group of pattern in a xml file
by kubrat
in thread I want to find a group of pattern in a xml file
by cybär
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |