• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Noob question in regards to NSXMLParser
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Noob question in regards to NSXMLParser


  • Subject: Noob question in regards to NSXMLParser
  • From: "Eric E. Dolecki" <email@hidden>
  • Date: Tue, 07 Jun 2011 10:03:22 -0400

I am fetching some XML weather from Google:

<xml_api_reply version="1">
<weather module_id="0" tab_id="0" mobile_row="0" mobile_zipped="1" row="0"
section="0">
<forecast_information>
<city data="Framingham, MA"/>
<postal_code data="01701"/>
<latitude_e6 data=""/>
<longitude_e6 data=""/>
<forecast_date data="2011-06-07"/>
<current_date_time data="2011-06-07 12:38:31 +0000"/>
<unit_system data="US"/>
</forecast_information>
<current_conditions>
<condition data="Sunny"/>
<temp_f data="69"/>
<temp_c data="21"/>
<humidity data="Humidity: 66%"/>
<icon data="/ig/images/weather/sunny.gif"/>
<wind_condition data="Wind: NW at 3 mph"/>
</current_conditions>
<forecast_conditions>
<day_of_week data="Tue"/>
...

What I am really after is the current_conditions data. How can one specify
WHERE in the XML to use the attributes from? A lot of the information is
repeated in other nodes so I can't just check (if([elementName
isEqualToString:@"condition"]){) , how can I check if the current element is
within a specific tag? (In this case the parent is current_conditions)?

Eric
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Noob question in regards to NSXMLParser
      • From: Jens Alfke <email@hidden>
    • Re: Noob question in regards to NSXMLParser
      • From: "Hank Heijink (Mailinglists)" <email@hidden>
  • Prev by Date: Re: iOS: Manually setting orientation makes a mess out of my interface
  • Next by Date: Re: Noob question in regards to NSXMLParser
  • Previous by thread: Re: iOS: Manually setting orientation makes a mess out of my interface
  • Next by thread: Re: Noob question in regards to NSXMLParser
  • Index(es):
    • Date
    • Thread