Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9255329
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T11:41:37+00:00 2026-06-18T11:41:37+00:00

I’m essentially saving the items from RSS feeds into an array and then placing

  • 0

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:

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];
        }

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:

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?

If it helps, here are 4 delegate methods that may be useful:

- (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
}

Thanks guys!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T11:41:38+00:00Added an answer on June 18, 2026 at 11:41 am

    Sounds like you could keep track of the index within videosArray in a variable (say, NSUInteger currentIndex) and use that in the feedParserDidFinish: method to start parsing the next feed.

    Write the following method:

    - (void) parseNextVideo
    {
        NSURL *feedURL = [NSURL URLWithString:[videosArray objectAtIndex:currentIndex++]];
        feedParser = [[MWFeedParser alloc] initWithFeedURL:feedURL];
        feedParser.delegate = self;
        feedParser.feedParseType = ParseTypeFull;
        feedParser.connectionType = ConnectionTypeAsynchronously;
        [feedParser parse];
    }
    

    Instead of your for loop, just:

    currentIndex = 0;
    [self parseNextVideo];
    

    And then in feedParserDidFinish::

    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
    if (currentIndex < videosArray.count) {
        [self parseNextVideo];
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I am confused How to use looping for Json response Array in another Array.
this is what i have right now Drawing an RSS feed into the php,
I have a French site that I want to parse, but am running into
I am currently running into a problem where an element is coming back from
That's pretty much it. I'm using Nokogiri to scrape a web page what has
For some reason, after submitting a string like this Jack’s Spindle from a text
I've got a string that has curly quotes in it. I'd like to replace
I have a small JavaScript validation script that validates inputs based on Regex. I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.