How to avoid downloading xml in android and directly open it in url
I have a url which directly downloads .pl file as xml on passing latitude and longitude within url. Now I have to first dowload it and then extra开发者_C百科ct data from XML. However, i guess again and again downloading will not be a gud solution as it will make app slower. Hence, I was thinking is there a way where i can avoid downloading and make that xml directly open in browser and then parse it using SAX parser. Can I store it some variable or something similar and then can parse it?
Thanks Astha
You need to download the data, which means retrieve the information from a distant server. What you could achieve is to try reading the file as you download it instead of downloading (ie saving in a temp file) then reading it.
It's the same idea as watching a streaming video (youtube ...) instead of downloading then watching a video.
I have no idea though on how to read directly a stream being downloaded.
精彩评论