I even tried parsing it with XML:Simple as :-
use strict; use XML::Simple; use Data::Dumper; my $xml_hash = XMLin('pon01100.xml'); print Dumper($xml_hash);
Its dumping the output as desired to the console.
What I want to do is for each of reactions (named rn:....) I want the substrate "id" and its corresponding all product "id". There could be cases when there would be two or more products for a substrate. For each of the reactions ,I want to save "substrate id" and all its corresponding "product id". Please help$VAR1 = { 'reaction' => { 'rn:R07892' => { 'substrate' => { 'name' => 'cpd:C +16331', 'id' => '3038' }, 'type' => 'reversible', 'id' => '983', 'product' => { 'name' => 'cpd:C16 +332', 'id' => '2201' } }, 'rn:R02687' => { 'substrate' => { 'name' => 'cpd:C +00641', 'id' => '3607' }, 'type' => 'reversible', 'id' => '3606', 'product' => { 'name' => 'cpd:C01 +885', 'id' => '3608' } }, 'rn:R05640' => { 'substrate' => { 'name' => 'cpd:C +01724', 'id' => '2269' }, 'type' => 'reversible', 'id' => '651', 'product' => { 'name' => 'cpd:C11 +455', 'id' => '2270' } }......and so on......
In reply to Parsing an XML file by zing
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |