in reply to Re: XML parsing Help..
in thread XML parsing Help..

Thanks davorg. That does help. For someone else who comes here looking for an answer to this same Q, here is what I did:
$xml = new XML::Simple (KeyAttr=>[],ForceArray=>['substrate','product' +]);
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:
foreach $g (@{$data->{reaction}}){ $length = scalar @{$g->{substrate}}; print " $g->{name}, len = $length\n"; }
Thanks for all your help! Cheers, Bioswami