in reply to XML Parsing

Hello, if i understand your question, ie retrieve the root name of the XML (not in your example), you can do it using XML::Twig
#!perl use strict; use warnings; use XML::Twig; my $twig= XML::Twig->new( ... ); $twig->parse(<DATA>); print $twig->root->gi,"\n";

HtH
L*
There are no rules, there are no thumbs..
Reinvent the wheel, then learn The Wheel; may be one day you reinvent one of THE WHEELS.

Replies are listed 'Best First'.
Re^2: XML Parsing
by RJP_NxtGam (Initiate) on May 28, 2015 at 16:24 UTC

    Thx, I'll give that a try. I was using LibXML and was able to use KeepRoot option and get the name put was not able to extract it. I'm new to Perl.