Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to use NSXMLParser to Find 1 Element
    primarykey
    data
    text
    <p>I have searched the internet for several days, but I cannot find a consise answer. I want to make a simple practice weather app that shows the temperature for a hardcoded zip code.</p> <p><strong>Here is the XML</strong></p> <pre><code>&lt;data&gt; &lt;request&gt; &lt;type&gt;Zipcode&lt;/type&gt; &lt;query&gt;08003&lt;/query&gt; &lt;/request&gt; &lt;current_condition&gt; &lt;observation_time&gt;08:29 PM&lt;/observation_time&gt; &lt;temp_C&gt;11&lt;/temp_C&gt; &lt;temp_F&gt;52&lt;/temp_F&gt; &lt;weatherCode&gt;143&lt;/weatherCode&gt; &lt;weatherIconUrl&gt; &lt;![CDATA[ http://www.worldweatheronline.com/images/wsymbols01_png_64/wsymbol_0006_mist.png ]]&gt; &lt;/weatherIconUrl&gt; &lt;weatherDesc&gt; &lt;![CDATA[ Mist ]]&gt; &lt;/weatherDesc&gt; &lt;windspeedMiles&gt;4&lt;/windspeedMiles&gt; &lt;windspeedKmph&gt;7&lt;/windspeedKmph&gt; &lt;winddirDegree&gt;210&lt;/winddirDegree&gt; &lt;winddir16Point&gt;SSW&lt;/winddir16Point&gt; &lt;precipMM&gt;0.0&lt;/precipMM&gt; &lt;humidity&gt;87&lt;/humidity&gt; &lt;visibility&gt;5&lt;/visibility&gt; &lt;pressure&gt;1013&lt;/pressure&gt; &lt;cloudcover&gt;100&lt;/cloudcover&gt; &lt;/current_condition&gt; &lt;weather&gt; &lt;date&gt;2012-12-08&lt;/date&gt; &lt;tempMaxC&gt;13&lt;/tempMaxC&gt; &lt;tempMaxF&gt;55&lt;/tempMaxF&gt; &lt;tempMinC&gt;9&lt;/tempMinC&gt; &lt;tempMinF&gt;48&lt;/tempMinF&gt; &lt;windspeedMiles&gt;6&lt;/windspeedMiles&gt; &lt;windspeedKmph&gt;9&lt;/windspeedKmph&gt; &lt;winddirection&gt;W&lt;/winddirection&gt; &lt;winddir16Point&gt;W&lt;/winddir16Point&gt; &lt;winddirDegree&gt;260&lt;/winddirDegree&gt; &lt;weatherCode&gt;122&lt;/weatherCode&gt; &lt;weatherIconUrl&gt; &lt;![CDATA[ http://www.worldweatheronline.com/images/wsymbols01_png_64/wsymbol_0004_black_low_cloud.png ]]&gt; &lt;/weatherIconUrl&gt; &lt;weatherDesc&gt; &lt;![CDATA[ Overcast ]]&gt; &lt;/weatherDesc&gt; &lt;precipMM&gt;3.1&lt;/precipMM&gt; &lt;/weather&gt; &lt;/data&gt; </code></pre> <p>ALL I want to do is to extract the *temp_F* and store it in a NSString. </p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload