F f4u5t Member Licensed User Longtime User Dec 23, 2012 #1 Im trying to get at Rss reader working using the XmlSax library, which I have the parseing part working fine, once I manually download the xml. Im having trouble downloading the xml file thought. The feed is dynamically created thorough a php script, and I cant seem to figure it out how to save it within the program so I can parse it. the feed url looks like this www.somesite.com/classifieds/newads.php?type=new im trying to use the download service to retrieve it Code: Copy DownloadService.URL = "www.somesite.com/classifieds/newads.php?type=new" DownloadService.Target = File.OpenOutput(File.DirDefaultExternal, "CLASSIFIEDS.xml", False) StartService(DownloadService)
Im trying to get at Rss reader working using the XmlSax library, which I have the parseing part working fine, once I manually download the xml. Im having trouble downloading the xml file thought. The feed is dynamically created thorough a php script, and I cant seem to figure it out how to save it within the program so I can parse it. the feed url looks like this www.somesite.com/classifieds/newads.php?type=new im trying to use the download service to retrieve it Code: Copy DownloadService.URL = "www.somesite.com/classifieds/newads.php?type=new" DownloadService.Target = File.OpenOutput(File.DirDefaultExternal, "CLASSIFIEDS.xml", False) StartService(DownloadService)
Erel B4X founder Staff member Licensed User Longtime User Dec 24, 2012 #2 You should use HttpUtils2. It is much better than DownloadService. Upvote 0
F f4u5t Member Licensed User Longtime User Dec 27, 2012 #3 Could you please give me an example? I tried it initailly but couldnt get it going, this is what I had Ive tried to just get a simple static html page with the same results Code: Copy b4a = "http://www.thesamba.com/vw/classifieds/newads.php?Type=new"&"&format=xml" HttpUtils.CallbackActivity = "Main" 'Current activity name. HttpUtils.Download("Job1", b4a) HttpUtils.CallbackJobDoneSub = "JobDone" 'If FirstTime Then parser.Initialize ' End If Last edited: Dec 27, 2012 Upvote 0
Could you please give me an example? I tried it initailly but couldnt get it going, this is what I had Ive tried to just get a simple static html page with the same results Code: Copy b4a = "http://www.thesamba.com/vw/classifieds/newads.php?Type=new"&"&format=xml" HttpUtils.CallbackActivity = "Main" 'Current activity name. HttpUtils.Download("Job1", b4a) HttpUtils.CallbackJobDoneSub = "JobDone" 'If FirstTime Then parser.Initialize ' End If
Erel B4X founder Staff member Licensed User Longtime User Dec 27, 2012 #4 See HttpUtils2 tutorial: Basic4android Search: httputils2 Upvote 0
NJDude Expert Licensed User Longtime User Dec 27, 2012 #5 If you like, also take a look at THIS sample. Upvote 0