Parsing results from web service
I am currently trying to parse the results returned from a webservice. Is there a way to do this in a simple manner. The response is returned in XML format. Currently, the code is as follows:
Uri uri = Uri.parse("http://www.example.com/restaurant/sanfrancisco?search=pizz开发者_如何转开发a");
Intent intent = new Intent(Intent.ACTION_VIEW, uri);
The results returned from this code is a single chunk of data. I would like to take this result and display them in a decent format, preferably a list format. Is there a straight forward way to do this?
There are plenty of XML parsing tutorials on the net. Take a look at them. You can either use a SAX or a DOM parser.
http://www.androidpeople.com/android-xml-parsing-tutorial-using-saxparser/
精彩评论