Created
November 30, 2011 12:09
-
-
Save ratnose/1408844 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
-(NSMutableArray*)getNews:(NSString*) rssurl { | |
MARXMLParser *parser = [[MARXMLParser alloc] init]; | |
NSMutableArray *newsTempArray = [parser parseXMLUrl:rssurl]; | |
NSMutableArray *returnArray = [[NSMutableArray alloc] initWithCapacity:(newsTempArray.count/2)]; | |
NSLog(@"%@",newsTempArray); | |
for (int i=1; i<(newsTempArray.count/2); i++) { | |
MARNewsObject *news = [[MARNewsObject alloc] init]; | |
news.newsTitle = [newsTempArray objectAtIndex:i]; | |
news.newsPubDate = [newsTempArray objectAtIndex:i+1]; | |
NSLog(@"%@",[newsTempArray objectAtIndex:i]); | |
[returnArray addObject:news]; | |
} | |
return returnArray; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment