Hey there,
I have the following scenario: I send a XML file to a server as a request and get a XML file as response and all that as a background thread on android.
The XML request is serialized using various values. The XML response is then read by SAX and put into a list. The whole request/response process happens in a background thread using the AsyncTask class.
The problem is that I have different types of responses and I have no idea what approach to take to parse the response based on the request sent.
How do I tell Android to use parser A based on request A and parser B based on request B?
Appreciate your help.
EDIT: With different types of responses I mean the XML file looks different. It has different tags and different attributes.