bms9nmh has asked for the wisdom of the Perl Monks concerning the following question:
#!/bin/perl -w use strict; use XML::Twig; my $twig = XML::Twig->new( twig_handlers => {item => \&acct} ); $twig->parsefile("output_1.xml"); sub acct { my ($t, $elt) = @_; for my $tag (qw(itemId title viewItemURL convertedCurrentPri +ce)) { print $elt->field($tag), "\n"; } print "\n"; print "\n"; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Code to 'wildcard' multiple files or another suggestion?
by toolic (Bishop) on Apr 21, 2016 at 19:25 UTC | |
by bms9nmh (Novice) on Jun 27, 2016 at 11:05 UTC | |
|
Re: Code to 'wildcard' multiple files or another suggestion?
by Anonymous Monk on Apr 21, 2016 at 19:19 UTC |