Discussion on:

Message 16 of 16
0 Votes
+ -
Getting the xml tag names
$data->{employee}->[0]->{name} this is giving the value at specific path..
Same way i need to get the child node's names inside specific path (i.e., tag names inside {employee}->[0]->{name} ) i specify..
how to do this..

xml can be like,

xml
--employee
------name
---------fname /fname
---------lname /lname
------/name
--/employee
--employee
------name
---------fname /fname
---------lname /lname
------/name
--/employee
/xml


So, i want the tag names inside employee[0]->name (i.e., it should return me fname, lname)

Please share your suggestions.
Posted by shariprasath
Updated - 13th Dec