I have the following scenario.
I send the XML file to the server as a request and get the XML file as a response and all this as a background thread on Android.
An XML request is serialized using various values. The XML response is then read by SAX and placed on the list. The entire request / response process takes place in the background thread using the class AsyncTask.
The problem is that I have different types of answers, and I have no idea what approach to take to analyze the answer based on the sent request.
How to tell Android to use parser A based on request A and parser B based on request B?
EDIT: With different types of answers, I mean that the XML file looks different. It has different tags and different attributes.
source
share