in reply to perl xpath extraction

Check out XML::Twig:

use XML::Twig; my $t= XML::Twig->new( twig_handlers => { 'editor[@role="editor"]' => sub { print $_->text() }, }); $t->parsefile( 'yourfile.xml' );

Replies are listed 'Best First'.
Re^2: perl xpath extraction
by mertserger (Curate) on Apr 11, 2011 at 09:43 UTC
    I would agree with the suggestion to use XML::Twig. I use Perl to process XML data all the time and have found XML::Twig indispensable.