• 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
Problem with nested tags in xml
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Problem with nested tags in xml


  • Subject: Problem with nested tags in xml
  • From: Ariel Rodriguez <email@hidden>
  • Date: Wed, 12 Nov 2008 19:41:16 -0200

I'm playing with a REST implementation. Basically, i am following this tutorial: http://developer.apple.com/webapps/articles/creatingrestfulclients.html
And, as you can see, the xml produced by the app is this:
<?xml version="1.0" encoding="UTF-8"?> <CountryData> <country> <id>37</ id> <country>Canada</country> <gdp>1274000000000</gdp> <iso_code>ca</ iso_code> </country> </CountryData>
Where each country has a country tag (the name). My question is how to parse an xml where there are nested tags with the very same name.
I've tried to catch the country tag on parser:didEndElement:namespaceURI:qualifiedName: with an
if([elementName isEqualToString:@"country"]) {}
but this catch the parent and nested country tag. There is way to know the difference? _______________________________________________


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: Problem with nested tags in xml
      • From: "Stephen J. Butler" <email@hidden>
  • Prev by Date: Re: tableView:objectValueForTableColumn:row not being called
  • Next by Date: Re: Problem with nested tags in xml
  • Previous by thread: Re: Validating a non-optional transient Core Data property - it can be erased?!
  • Next by thread: Re: Problem with nested tags in xml
  • Index(es):
    • Date
    • Thread