http://www.perlmonks.org?node_id=585087


in reply to Confusion ,XML::SIMPLE with DATA:DUMPER

A little snipet to get you going, you could easyly post-process the output if this:
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; };



This is not a Signature...