in reply to Filtering large XML files
use XML::Twig; my $t= XML::Twig->new(pretty_print => 'indented', twig_handlers => { 'text'=>sub{ print $_[1]->text; $_[0]->purge; # or: # my $useful = $_[1]->text; # my $ret_val = some_sub_that_p +rocess_it_further($useful); # $_[0]->purge; }, } );
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Filtering large XML files
by PT (Novice) on Feb 23, 2015 at 11:24 UTC |