Post 9 made on Tuesday July 14, 2020 at 16:35 |
thebaz67 Long Time Member |
Joined: Posts: | December 2008 13 |
|
|
function ParseXML(xmldata) { var xmldata = xmldata.replace(/^<\?xml\s+version\s*=\s*(['"])[^\1]+\1[^?]*\?>/, "") var weatherData = new XML(xmldata);
// Set Activity label to 'standby'. CF.activity().label = "standby mode...";
// Obtain the name of city based on city code data. var locationText = "" + weatherData.city.@name; // Force it to be a string.
if I left out the . prior to the @ I did not get the information from the xml file I was expecting.
When I used the _PS_DEBUG I would see an error if I left out the period.
This is not my code, It is from Scott's weather module, I am just making the changes to use the openweather feed.
thank you for your help, it seems to be working now.
|
|
|