in reply to Re: XML parsing Help..
in thread XML parsing Help..
So I specifically made all "substrate" and "product" elements into arrays. I then had to figure out the number of elements in that array. And this I did by:$xml = new XML::Simple (KeyAttr=>[],ForceArray=>['substrate','product' +]);
Thanks for all your help! Cheers, Bioswamiforeach $g (@{$data->{reaction}}){ $length = scalar @{$g->{substrate}}; print " $g->{name}, len = $length\n"; }
|
|---|