U urikupfer Member Licensed User Longtime User Jan 31, 2013 #1 How can I stop reading very big rss file (that take too long time) after constant number of items?
Erel B4X founder Staff member Licensed User Longtime User Jan 31, 2013 #2 There is no simple way to stop the parsing. You can use ExceptionEx from the Threading library to throw an exception from one of the parsing events. This will stop the parsing. Upvote 0
There is no simple way to stop the parsing. You can use ExceptionEx from the Threading library to throw an exception from one of the parsing events. This will stop the parsing.
U urikupfer Member Licensed User Longtime User Jan 31, 2013 #3 Hi erel I have tried this solution, I throw exception in the start element event, but I get the error message , in java surrounding the Parser.Parse2 with try catch solve it , in b4a it doesn't help. Upvote 0
Hi erel I have tried this solution, I throw exception in the start element event, but I get the error message , in java surrounding the Parser.Parse2 with try catch solve it , in b4a it doesn't help.
Erel B4X founder Staff member Licensed User Longtime User Feb 3, 2013 #4 You are correct. My suggestion will not work. You can however just return from the events immediately after a certain number of items. Are you using HttpUtils2 to download the feed? Upvote 0
You are correct. My suggestion will not work. You can however just return from the events immediately after a certain number of items. Are you using HttpUtils2 to download the feed?
U urikupfer Member Licensed User Longtime User Feb 9, 2013 #5 Hi Erel No, I am not using the HttpUtils2 , for some reason it doesn't download all the string I need. Any way I have written the parser in a class with a thread and this way it work fine. uri Attachments ParserClass.bas ParserClass.bas 4.9 KB · Views: 500 Upvote 0
Hi Erel No, I am not using the HttpUtils2 , for some reason it doesn't download all the string I need. Any way I have written the parser in a class with a thread and this way it work fine. uri
Erel B4X founder Staff member Licensed User Longtime User Feb 10, 2013 #6 for some reason it doesn't download all the string I need. Click to expand... Have you checked it by logging the response? Android logs are limited to 4000 characters. Upvote 0
for some reason it doesn't download all the string I need. Click to expand... Have you checked it by logging the response? Android logs are limited to 4000 characters.
U urikupfer Member Licensed User Longtime User Feb 10, 2013 #7 hi erel yes ,it download much less. Upvote 0
Erel B4X founder Staff member Licensed User Longtime User Feb 10, 2013 #8 This is most probably a bug in your code. HttpUtils2 will only set the Success flag if the download was completed successfully. If you like you can post your code. Upvote 0
This is most probably a bug in your code. HttpUtils2 will only set the Success flag if the download was completed successfully. If you like you can post your code.
U urikupfer Member Licensed User Longtime User Feb 10, 2013 #9 hi erel Attachments RSS_Reader.zip RSS_Reader.zip 207.1 KB · Views: 514 Upvote 0
Erel B4X founder Staff member Licensed User Longtime User Feb 12, 2013 #10 I meant the code based on HttpUtils2. Upvote 0
U urikupfer Member Licensed User Longtime User Feb 12, 2013 #11 hi erel now it`s working fine with HttpUtils2 ,and as you can see the parser stops after 500 items. Attachments RSS_Reader.zip RSS_Reader.zip 214.9 KB · Views: 487 Upvote 0
Erel B4X founder Staff member Licensed User Longtime User Feb 12, 2013 #12 Just to make sure, it works as you want it to be, right? Upvote 0