in reply to Re^2: problems with Xpath
in thread problems with Xpath

When I run your code, I do NOT get any errors (warnings, yes). But then, I have XML::XPath installed.

I suggest installing modules before attempting to use them.


Update: Note that I'm not saying the code does what you want; see other replies in this thread for that. But to get the Can't locate object method "getAttribute" via package "XML::XPath::NodeSet" at C:\Perl\try1.pl line 13. error to go away, install the module.

HTH,

planetscape

Replies are listed 'Best First'.
Re^4: problems with Xpath
by ikegami (Patriarch) on Jan 10, 2008 at 18:05 UTC
    It's not a module installation issue. If it was, XML::XPath wouldn't be able to load the module, and that would result in the error Can't locate XML/XPath/NodeSet.pm in @INC.

    NetWallah's right in saying the OP is incorrectly treating an XML::XPath::NodeSet object as an XML::XPath::Node::Element object. The OP should review the return value of findnodes.