It is currently April 25th, 2024, 7:41 am

Disappearing Parse in AccuWeather

General topics related to Rainmeter.
sgtevmckay

Disappearing Parse in AccuWeather

Post by sgtevmckay »

Ok

Here is one I hope our more learned will know

I recently found out that AccuWeather only post the wind gust, when there is wind gusts, in the current conditions

Code: Select all

<adc_database>
[code]−
<units>
<temp>C</temp>
<dist>KM</dist>
<speed>KPH</speed>
<pres>kPa</pres>
<prec>MM</prec>
</units>
−
<local>
<city>Santa Fe</city>
<state>NM</state>
<lat>35.62</lat>
<lon>-105.97</lon>
<time>18:10</time>
<timeZone>-7</timeZone>
<obsDaylight>1</obsDaylight>
</local>
−
<watchwarnareas zone="NMZ003" county="NMC049" isactive="0">
−
<url>
http://www.accuweather.com/watches-warnings.asp?partner=rainmeter&zipcode=87505&county=NMC049&zone=NMZ003
</url>
</watchwarnareas>
−
<currentconditions>
−
<url>
http://www.accuweather.com/index-forecast.asp?partner=rainmeter&zipcode=87505
</url>
<observationtime>6:10 PM</observationtime>
<pressure state="Unavailable">101</pressure>
<temperature>30</temperature>
<realfeel>29</realfeel>
<humidity>15%</humidity>
<weathertext>Mostly Cloudy</weathertext>
<weathericon>06</weathericon>
<windgusts>24</windgusts>
My question is: what, if any, kinds of head aches can we expect from parsing the wind gust, when the XML thread is not there?
Will this adjust the Index, or cause any immediate skin issues I should be aware of, or will it just not read when it is not available and show a blank, oe should I expect some type of error to pop up?
User avatar
jsmorley
Developer
Posts: 22629
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Disappearing Parse in AccuWeather

Post by jsmorley »

sgtevmckay wrote:Ok

Here is one I hope our more learned will know

I recently found out that AccuWeather only post the wind gust, when there is wind gusts, in the current conditions

Code: Select all

<adc_database>
[code]−
<units>
<temp>C</temp>
<dist>KM</dist>
<speed>KPH</speed>
<pres>kPa</pres>
<prec>MM</prec>
</units>
−
<local>
<city>Santa Fe</city>
<state>NM</state>
<lat>35.62</lat>
<lon>-105.97</lon>
<time>18:10</time>
<timeZone>-7</timeZone>
<obsDaylight>1</obsDaylight>
</local>
−
<watchwarnareas zone="NMZ003" county="NMC049" isactive="0">
−
<url>
http://www.accuweather.com/watches-warnings.asp?partner=rainmeter&zipcode=87505&county=NMC049&zone=NMZ003
</url>
</watchwarnareas>
−
<currentconditions>
−
<url>
http://www.accuweather.com/index-forecast.asp?partner=rainmeter&zipcode=87505
</url>
<observationtime>6:10 PM</observationtime>
<pressure state="Unavailable">101</pressure>
<temperature>30</temperature>
<realfeel>29</realfeel>
<humidity>15%</humidity>
<weathertext>Mostly Cloudy</weathertext>
<weathericon>06</weathericon>
<windgusts>24</windgusts>
My question is: what, if any, kinds of head aches can we expect from parsing the wind gust, when the XML thread is not there?
Will this adjust the Index, or cause any immediate skin issues I should be aware of, or will it just not read when it is not available and show a blank, oe should I expect some type of error to pop up?
If they don't put in an empty set like <windgusts></windgusts> with nothing between, but just leave out the entire tag sequence, it will cause MASSIVE problems for anyone parsing and using <windgusts> in any way. (as just a search or as a return value) The search and therefore the entire measure will fail. If this is so, people must be warned to NEVER use that tag set in a RegExp statement.

I find it hard to believe that they don't show it as <windgusts>/windgusts> when there are none however, as this is really, really bad RSS / XML and if it is true they should be asked to either take out the tag altogether and never show it, or be consistent with the RSS format.