Note that there are some explanatory texts on larger screens.

plurals
  1. POHow can I parse a list of RSS feeds one at a time?
    primarykey
    data
    text
    <p>I'm essentially saving the items from RSS feeds into an array and then placing that array into another one to contain them all. For instance, I'm working on saving a bunch of educational videos by Chapter (each chapter has an RSS feed), so I'm parsing them using MWFeedParser all at once using this logic:</p> <pre><code>for (NSString *url in videosArray) { NSURL *feedURL = [NSURL URLWithString:url]; feedParser = [[MWFeedParser alloc] initWithFeedURL:feedURL]; feedParser.delegate = self; feedParser.feedParseType = ParseTypeFull; feedParser.connectionType = ConnectionTypeAsynchronously; [feedParser parse]; } </code></pre> <p>While this does the job, if the Chapter 3 RSS feed finishes parsing before Chapter 2, the content of Chapter 3 is saved in Chapter 2's spot. While this may sound like an unnecessarily complicated explanation, my request is simply this:</p> <p>Is there any way to parse one feed at a time from a list of feeds and not continue until a feed is fully parsed it's contents are inserted into the array?</p> <p>If it helps, here are 4 delegate methods that may be useful:</p> <pre><code>- (void)feedParserDidStart:(MWFeedParser *)parser { NSLog(@"Started Parsing: %@", parser.url); } - (void)feedParser:(MWFeedParser *)parser didParseFeedInfo:(MWFeedInfo *)info { NSLog(@"Parsed Feed Info: “%@”", info.title); self.title = info.title; } - (void)feedParser:(MWFeedParser *)parser didParseFeedItem:(MWFeedItem *)item { NSLog(@"Parsed Feed Item: “%@”", item.title); if (item) [parsedItems addObject:item]; } - (void)feedParserDidFinish:(MWFeedParser *)parser { NSLog(@"Finished Parsing%@", (parser.stopped ? @" (Stopped)" : @"")); [courseBeingBuilt.mediaCollection addObject:parsedItems]; // Place chapter contents into Course's Chapter w/contents array parsedItems = [[NSMutableArray alloc] init]; // Create new array for new chapter } </code></pre> <p>Thanks guys!</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload