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"; }
In reply to Re^5: Print multiple value from file
by poj
in thread Print multiple value from file
by Helan_Ahmed
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |