Problem with nested tags in xml
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