Created
December 11, 2011 12:25
-
-
Save ratnose/1460324 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-(void)parser:(NSXMLParser *)parser didEndElement:(NSString *)elementName namespaceURI:(NSString *)namespaceURI qualifiedName:(NSString *)qName { | |
if([elementName isEqual:@"title"] || [elementName isEqual:@"pubDate"] || [elementName isEqual:@"description"]) { | |
if([parseElement isEqualToString:@"title"]) { | |
[xmlDictionary setValue:xmlContent forKey:@"newsTitle"]; | |
} | |
if([parseElement isEqualToString:@"date"]) { | |
[xmlDictionary setValue:xmlContent forKey:@"newsPubDate"]; | |
} | |
if([parseElement isEqualToString:@"desc"]) { | |
[xmlDictionary setValue:xmlContent forKey:@"newsDescription"]; | |
} | |
[dictionaryStoreArray addObject:xmlDictionary]; | |
xmlContent = [[NSMutableString alloc] init]; | |
parseTime = NO; | |
} else { | |
parseTime = NO; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment