Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re^3: Xml::Twig:Xpath Xpath expression error

by ramrod (Chaplain)
on Apr 14, 2009 at 14:36 UTC ( #757402=note: print w/ replies, xml ) Need Help??


in reply to Re^2: Xml::Twig:Xpath Xpath expression error
in thread Xml::Twig:Xpath Xpath expression error

After reviewing your actual XML - it looks like your XPath is incorrect for your intentions. I don't see any attriubes in your XML.

Try something more like //OverallConnectionPoolStatus/FlowRater/Name/text() to reference your information.

The previous XPath's are attempting to search for attributes in the FlowRater node. What you actually have is a child node called Name with some information in it.

As far as why this works in some modules, and not in others I would postulate that the designer included this as a "feature" to help others out. - Or maybe you found a bug.


Comment on Re^3: Xml::Twig:Xpath Xpath expression error
Download Code
Replies are listed 'Best First'.
Re^4: Xml::Twig:Xpath Xpath expression error
by leonidlm (Pilgrim) on Apr 16, 2009 at 08:50 UTC
    I still cant make it to work :(
    The xpath expression you suggested:
    //OverallConnectionPoolStatus/FlowRater/Name/text()
    Still makes Twig crash! Why? it is a valid xpath expression!

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (3)
As of 2015-08-30 00:50 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The oldest computer book still on my shelves (or on my digital media) is ...













    Results (346 votes), past polls