I'm using XML::Bare module in Perl.
My XML is something like:
<xml><element num="1"><num>10</num></element><element num="2"><num>20</num></element></xml>
I want to extract the value contained in child <num>
tag. i.e. I want 10 and 20
as output. But, when I get value using $xml->{element}->[$i]->{num}->{value}
, it returns 1 and 2
; i.e., it returns with value of num
attribute instead of child node.
Can anyone please help me how to handle cases when attribute and child name are same?