in reply to Confusion ,XML::SIMPLE with DATA:DUMPER
use strict; use warnings; use XML::Twig; my $t = XML::Twig->new( twig_handlers => { 'PHONENO/ENTRY' => \&print_n_purge, 'REASON/ENTRY' => \&print_n_purge, } ); $t->parsefile($your_xml_file); sub print_n_purge { my( $t, $elt)= @_; print $elt->parent->name,":",$elt->text , "\n"; $t->purge; };
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Confusion ,XML::SIMPLE with DATA:DUMPER
by ultibuzz (Monk) on Nov 20, 2006 at 20:04 UTC | |
by Joost (Canon) on Nov 20, 2006 at 21:44 UTC | |
by ultibuzz (Monk) on Nov 20, 2006 at 22:20 UTC | |
by Joost (Canon) on Nov 20, 2006 at 22:46 UTC |