bug in evaluateXPathAsString?

Post your questions and help other users.

Moderator: Martin

Post Reply
syndromtr
Posts: 31
Joined: 01 Feb 2013 13:28

bug in evaluateXPathAsString?

Post by syndromtr » 27 Feb 2013 16:10

hi, i started a new flow using yahoo weather api with evaluateXPathAsString. here's my flow:

trigger: none
action: http request: http://weather.yahooapis.com/forecastrss?w=2343733&u=c GET , variable, variable name = wea
action: script : var=evaluateXPathAsString(wea, "//yweather:condition/@text");
condition: debug dialog

when i execute this flow manually, wea variable gets all the xml text from web. but var variable is empty in debug dialog..
i checked this "//yweather:condition/@text" Xpath in online xpath tester websites and result is ok. (text="Partly Cloudy" result from xpath)

is this a bug or something is wrong on this flow, typo etc?
regards..

User avatar
Martin
Posts: 4468
Joined: 09 Nov 2012 14:23

Re: bug in evaluateXPathAsString?

Post by Martin » 27 Feb 2013 17:31

Hi,

Namespaces are currently not well supported, you probably have to remove the namespace before you process the XML.
wea=replace(wea, "yweather:", "");
temp=evaluateXPathAsString(wea, "//condition/@temp");
text=evaluateXPathAsString(wea, "//condition/@text");

The namespaces should work as expected in the next update.

Regards
Martin

Post Reply