in reply to TWIGging XML to CSV: what's wrong with my syntax?
use warnings; use strict; use XML::Rules; my @attribs = qw( townname allianceticker playername townname mapy mapx ); my @rules = ( town => sub { my $town = $_[1]; return if $town->{mapx} <= 500; print join(",", @$town{@attribs}), "\n"; return; }, 'player,towndata,location,playeralliance' => 'pass no content', _default => 'content', ); my $xr = XML::Rules->new( rules => \@rules ); $xr->parsefile('tmp.xml');
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: TWIGging XML to CSV: what's wrong with my syntax?
by tinker (Initiate) on Apr 11, 2015 at 01:37 UTC | |
by runrig (Abbot) on Apr 16, 2015 at 23:26 UTC |