-(void)parser:(NSXMLParser *)parser didEndElement:(NSString *)elementName namespaceURI:(NSString *)namespaceURI qualifiedName:(NSString *)qName{
if([elementName isEqualToString:kName_Item]){
[titleData addObject:currentTitleItem];
}else if ([elementName isEqualToString:kName_Title]) {
currentTitleItem.title = [currentString mutableCopy];
} else if ([elementName isEqualToString:kName_Link]) {
currentTitleItem.link = [currentString mutableCopy];
}
currentTitleItem.title = [currentString mutableCopy];
currentTitleItem.link = [currentString mutableCopy];
应该深拷贝,不然会被有bug,因为复制的时指针(right?)
本文转自老Zhan博客园博客,原文链接:http://www.cnblogs.com/mybkn/archive/2012/03/25/2416372.html,如需转载请自行联系原作者