Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

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

by ankit.tayal560 (Beadle)
on Sep 27, 2016 at 08:55 UTC ( [id://1172729]=note: print w/replies, xml ) Need Help??


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.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1172729]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others having a coffee break in the Monastery: (3)
As of 2024-04-19 19:44 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found