in reply to Re^4: Print multiple value from file
in thread Print multiple value from file
Consider using XML::Twig for parsing XML
UPDATE : added Observed#!perl use strict; use warnings; use XML::Twig; my $twig = new XML::Twig( twig_handlers =>{ 'Ss' => \&Ss } ); $twig->parsefile('ds_chY.xml'); sub Ss { my ($t,$e) = @_; my $obs = $e->first_child('Sequence')->first_child('Observed'); print $e->att('ssId')."\t".$e->att('subSnpClass')."\t"; print $obs->text."\n"; }
|
|---|