Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is it possible to get 1st 10 articles of a feed? #20

Closed
bluekite2000 opened this issue Feb 5, 2011 · 4 comments
Closed

Is it possible to get 1st 10 articles of a feed? #20

bluekite2000 opened this issue Feb 5, 2011 · 4 comments

Comments

@bluekite2000
Copy link

I dont want to download all the articles of the feed. The file is too big. I just want to download the 1st 10 and if the user wants more he can click on "Load more" and it will download more.

@mwaterfall
Copy link
Owner

The full feed contents must be downloaded for the XML document to be valid and the parsing to begin. However you are able to stop the parsing operation after the first item has been parsed (i.e. calling the -stopParsing the first time -feedParser:didParseFeedItem: is called). This will prevent the parser from parsing of the rest of the document. Hope this helps.

@bluekite2000
Copy link
Author

The parsing doesnt take much time. its the downloading. Can I do parallel downloading? Or can I just download new articles (currently I m downloading a big feed every hour but usually 95% of the feed is old news ie. i have already downloaded and parsed them) Is then a way to just download articles that have NOT been downloaded before?

@mwaterfall
Copy link
Owner

Unfortunately I'm not aware of any easy way of doing this. I'm sure it's possible, however it's out of the scope of this project.

If you were to successfully merge previously downloaded data and new feed items, you could fork this project and pass the XML parser your own NSData object containing the new merged document.

Best of luck!

@bluekite2000
Copy link
Author

I dont want to merge previously downloaded data and new feed items. Previously downloaded data has already been parsed. I dont want to parse it again. If a user refreshes, I want to download articles that have been recently published. Since you said you need to download the entire feed before you need to parse it, it sounds redundant since the app will have to parse articles it has parsed before.

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants