The following xquery works for me:
declare namespace yweather = "http://xml.weather.yahoo.com/ns/rss/1.0";
doc("focus.xml")/rss/channel/yweather:location/@city/string()
declare namespace yweather = "http://xml.weather.yahoo.com/ns/rss/1.0";
doc("focus.xml")/rss/channel/yweather:location/@city/string()
To copy to clipboard, switch view to plain text mode
so your code should read:
XmlListModel{
id: weatherModel
source: "http://weather.yahooapis.com/forecastrss?p=ARBA0004&u=c"
query: "/rss/channel"
namespaceDeclarations: "declare namespace yweather = 'http://xml.weather.yahoo.com/ns/rss/1.0';"
XmlRole{ name: "city"; query: "yweather:location/@city/string()" }
}
XmlListModel{
id: weatherModel
source: "http://weather.yahooapis.com/forecastrss?p=ARBA0004&u=c"
query: "/rss/channel"
namespaceDeclarations: "declare namespace yweather = 'http://xml.weather.yahoo.com/ns/rss/1.0';"
XmlRole{ name: "city"; query: "yweather:location/@city/string()" }
}
To copy to clipboard, switch view to plain text mode
Bookmarks