This is the workaround I got based on Don's Answer.
I parsed the content inside <string>
tag with XMLPullParser, stored the response in a String and then fed that String (which is now the XML without the <string>
tag)
Here's a little sample if anyone is going through the same problem:
XmlPullParserFactory factory = null;
String parsed = "";
try {
factory = XmlPullParserFactory.newInstance();
factory.setNamespaceAware(true);
XmlPullParser xpp = factory.newPullParser();
xpp.setInput(new StringReader (responce));
int eventType = xpp.getEventType();
while (eventType != XmlPullParser.END_DOCUMENT) {
if(eventType == XmlPullParser.START_DOCUMENT) {
Log.d(Constants.TAG,"Start document");
} else if(eventType == XmlPullParser.END_DOCUMENT) {
Log.d(Constants.TAG,"End document");
} else if(eventType == XmlPullParser.START_TAG) {
Log.d(Constants.TAG,"Start tag "+xpp.getName());
} else if(eventType == XmlPullParser.END_TAG) {
Log.d(Constants.TAG,"End tag "+xpp.getName());
} else if(eventType == XmlPullParser.TEXT) {
Log.d(Constants.TAG,"Text "+xpp.getText());
parsed = xpp.getText();
}
eventType = xpp.next();
}
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
xmlResponse = parsed;
So from here, I feed in the xmlResponse
object to my CaseParser
object which was already written to handle and store the xml in my objects.
Hope it helps someone else too. Cheers!