Hello AhmedABdo, and welcome to the Monastery!
Try changing:
print $species->next_sibling_text('Observed');
to:
for my $observed ($species->descendants('Observed')) { print $observed->text(); }
(Also, please add <code> ... </code> tags around the file data.)
Hope that helps,
| Athanasius <°(((>< contra mundum | Iustus alius egestas vitae, eros Piratica, |
In reply to Re: Print XML elements and attributes
by Athanasius
in thread Print XML elements and attributes
by AhmedABdo
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |