in reply to Print XML elements and attributes

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,

Replies are listed 'Best First'.
Re^2: Print XML elements and attributes
by AhmedABdo (Acolyte) on Aug 30, 2015 at 16:52 UTC
    Thanks A lot, it helped me and fixed the problem. Also, thanks for reminding me for using