I'm trying to write an app using World Weather Online services. The request from their website gives me a weather code telling the type of weather. This value is a number corresponding a description in a XML file which looks like this:
<condition>
<code>119</code>
<description>Cloudy</description>
<day_icon>
wsymbol_0003_white_cloud</day_icon>
<night_icon>
wsymbol_0004_black_low_cloud
</night_icon>
</condition>
<condition>
<code>116</code>
<description>Partly Cloudy</description>
<day_icon>wsymbol_0002_sunny_intervals</day_icon>
<night_icon>wsymbol_0008_clear_sky_night</night_icon>
</condition>
<condition>
<code>113</code>
<description>Clear/Sunny</description>
<day_icon>wsymbol_0001_sunny</day_icon>
<night_icon>wsymbol_0008_clear_sky_night</night_icon>
</condition>
Using this XML file gives me the advantage of making translations for other languages. What I need is to search for the code and get the description into a variable for later use.
How do I do this using jQuery?
/Carl