parse an object that contains xml data



I'm building an Android application where I connect to the database via the web services. When I send information via the web services, I got an xml result, I then convert it to a string and display it in the edittext just like this



Handler uiThreadHandler = new Handler() {
public void handleMessage(Message msg) {
Object o = msg.obj;

EditText textIn = (EditText)((Activity)context).findViewById(R.id.editTextDoSelectResult);
textIn.setText(o.toString());

System.out.println(o.toString());
}
};

Message msg = uiThreadHandler.obtainMessage();
msg.obj = result;
msg.arg1 = sid;
uiThreadHandler.sendMessage(msg);
}


I'm trying to parse the XML in order to get specific values out of the xml result and display it in the appropriate field, I think i should follow something like this


http://ift.tt/1gQRT2N


My question is, how can I use the xml result that i get in my code as an inputstream in XmlPullParser


if there's anyway i can improve this question please let me know


No comments:

Post a Comment