나는 안드로이드에 AsyncTask에서 서버로 HTTP 게시물 요청 게시물 요청을 발사.Mange HTTP 응답 in 안드로이드
문제는 내가 응답 관리에 직면하고 있습니다. 여기 내가 응답을 읽는 방법.
HttpEntity entity =response.getEntity();
if (entity != null) {
DataInputStream in = new DataInputStream(entity.getContent());
String str;
while ((str = in.readLine()) != null){
Log.e("Debug","Server Response second url"+str);
}
in.close();
}
문제는 내가 조각 반응을 얻고있다,하지만 난 한 조각
현재 응답
Server Response second url
Server Response second url<header><status>Success</status><message>Check the Numbers:
Server Response second url123456.</message><vbal>5005</vbal></header>
예상 응답
<header><status>Success</status><message>Check the Numbers:123456.</message><vbal>5005</vbal></header>
에서 그들을 원
만약 내가 한 조각에 그것을 얻을 것이다 XML 응답을 쉽게 구문 분석하고 필요한 값을 가져올 수 있습니다.