Skip to content

Instantly share code, notes, and snippets.

@tomjadams
Created March 19, 2009 00:30
Show Gist options
  • Select an option

  • Save tomjadams/81502 to your computer and use it in GitHub Desktop.

Select an option

Save tomjadams/81502 to your computer and use it in GitHub Desktop.
+ (FKEither *)doParseContent:(NSString *)rssContent {
PXRss20ParserDelegate *parser = [[PXRss20ParserDelegate alloc] initWithContent:rssContent];
FKEither *maybeItems = [parser.parse.right map:[NSArray liftFunction:[FKFunction functionFromSelector:@selector(parseItem:)]]];
[parser release];
return maybeItems;
}
+ (PXRss20Item *)parseItem:(NSDictionary *)item {
return [PXRss20Item title:[item objectForKey:@"item"] link:[NSURL URLWithString:[item objectForKey:@"link"]] description:[item objectForKey:@"description"]];
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment