Question about TBXML
Question about TBXML
- Subject: Question about TBXML
- From: "Eric E. Dolecki" <email@hidden>
- Date: Tue, 09 Oct 2012 14:38:09 -0400
I have XML like this:
<questions>
<question title="foo">
<options>
<option>Katsup</option>
<option>Mustard</option>
</options>
</question>
...
While in the question element, I'd like to pull out each of those option
node values to create a mutable array from and stuff into a mutable
dictionary. I'm not sure how to do that (I'm using ARC)...
- (void)parseThatXML:(TBXMLElement *)element
{
do {
if(element -> firstChild)
[self parseThatXML:element -> firstChild];
if([[TBXML elementName:element] isEqualToString:@"question"])
{
NSMutableArray *array = [[NSMutableArray alloc] init];
*//? how do I now dig into this question's options option
values?*
while( ? ){
}
}
} while ((element = element -> nextSibling));
}
_______________________________________________
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