in reply to Accessing data between two tags
use XML::Rules; my @numbers; my $parser = XML::Rules->new( rules => [ '_default' => '', # not interested in most tags 'CS_REFCLT' => sub {push @numbers, $_[1]->{_content}; return}, ], ); $parser->parse($filename);
This way you don't have to worry whether there's just one <CS_REFCLT> on a line or whether there are more, etc.
|
|---|