Thanks Cody Pendant and Tanktalus.
my $simple = XML::Simple -> new (KeyAttr => 'node');
I thought the above was simple as the xml tree is returned as an hash of an hash and so on. But when i saw the structure entries like
and made me think. Since i want a subroutine it will be easy for me to use. Hence i plan to use
use XML::Twig;
I can pass the XML as a string, mid and name to the subroutine. The return from the subroutine can be the values and timestamps.