BufferedReader reader = null;
try{
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url(“http://10.0.2.2:8023/get_data.xml”)
.build();
Response response = client.newCall(request).execute();
String responseData = response.body().string();
paraseXMLWithPull(responseData);
}catch (Exception e){
e.printStackTrace();
}
}
}).start();
}
private void paraseXMLWithPull(String xmlData){
try{
XmlPullParserFactory factory = XmlPullParserFactory.newInstance();
XmlPullParser xmlPullParser = factory.newPullParser();
xmlPullParser.setInput(new StringReader(xmlData));
int evenType = xmlPullParser.getEventType();
String id="";
String name="";
String version="";
while(evenType !