How to reading XML from a URL in Android

后端 未结 3 591
心在旅途
心在旅途 2021-01-21 09:58

I want to read a XML document from a URL:

public void DownloadXmlFile() throws IOException{
        //TODO
        String url = \"http://api.m1858.com/coursebook         


        
3条回答
  •  孤独总比滥情好
    2021-01-21 10:53

    Why you don't google or look for the error here on stackoverflow? It's full of answers...

    You have to extend an AsyncTask to avoid the blocking of the GUI and do this kind of operation (as downloading or parsing stuff) in background.

提交回复
热议问题