XML parse file from HTTP

前端 未结 6 1536
广开言路
广开言路 2020-12-14 04:13

I have an XML file located at a location such as

http://example.com/test.xml

I\'m trying to parse the XML file to use it in my program with

6条回答
  •  挽巷
    挽巷 (楼主)
    2020-12-14 04:38

    It's much easier with a XMLPullParser ... you don't have to deal with this event stuff and can quickly pick up some keywords ... I'm using it too ... only a couple of code lines :)

    http://developer.android.com/reference/org/xmlpull/v1/XmlPullParser.html

    Regarding HTTP and files have a look here Download a file with DefaultHTTPClient and preemptive authentication

提交回复
热议问题