in reply to Re: error : can't locate object method "getAttribute" via package XML::DOM::NodeList
in thread error : can't locate object method "getAttribute" via package XML::DOM::NodeList

http://search.cpan.org/~tjmather/XML-DOM-1.46/lib/XML/DOM.pm : in XML::DOM classes section goto XML::DOM::Element. there it is documented. and config is itself an element/tag infact it is the root element of the .xml file?

  • Comment on Re^2: error : can't locate object method "getAttribute" via package XML::DOM::NodeList

Replies are listed 'Best First'.
Re^3: error : can't locate object method "getAttribute" via package XML::DOM::NodeList
by Corion (Patriarch) on Sep 27, 2016 at 08:59 UTC

    Yes, that function makes sense and is documented for an XML::DOM::Element. But what ->getElementsByTagName returns is not a single XML::DOM::Element object. Please refer to the SYNOPSIS section of XML::DOM to see the correct usage.

      can you please provide me some code to parse this xml file and get the different attributes?

        The SYNOPSIS section of XML::DOM shows all the parts you need. You already have all the other parts. I don't see what I could do to help you other than write your complete task for you. I think it is better if you complete the task you got yourself because it is you who gets paid for your task and not me.