2
NSXML解析器所有值我只能解析這個XML的第一個元素,但我想要得到的美食 這一切的內容是我的XML怎樣用iPhone上
<cuisines>
<cuisine>Asian</cuisine>
<cuisine>Nepalese</cuisine>
<cuisine>North Indian</cuisine>
<cuisine>Indian Vegetarian</cuisine>
<cuisine>Organic Cuisine</cuisine>
</cuisines>
,這是代碼解析
if ([elementName isEqualToString:@"cuisines"]) {
if ([elementName isEqualToString:@"cuisine"]) {
elementName=[[NSMutableString alloc] init];
keyInProgress = [elementName copy];
// This is a string we will append to as the text arrives
textInProgress = [[[NSMutableString alloc] init]autorelease];
return;
}
,但它不工作我想所有的值