나는 안드로이드 프로그래밍에 익숙하다. 나의 요구 사항은 웹 서비스를 호출하는 것이다. 나는 성공적으로 안드로이드에서 응답을 구문 분석하는 웹 services.how로부터 응답을 얻었다. 당신은 SimpleXmlParser를 사용하려고 할 수 있습니다안드로이드에서 xml 데이터의 문자열을 구문 분석하는 방법
HttpResponse response = httpclient.execute(httppost);
String str=response.getStatusLine().toString();
System.out.println("========URL STATUS========"+str);
HttpEntity r_entity = response.getEntity();
if(r_entity != null) {
result = new byte[(int) r_entity.getContentLength()];
if(r_entity.isStreaming()) {
is = new DataInputStream(r_entity.getContent());
is.readFully(result);
}
}
httpclient.getConnectionManager().shutdown();
String responsedata= (new String(result).toString());
어떤 종류의 형식 당신은 응답을 얻을? – rajeshwaran
우선 EntityUtils.toString()을 살펴보고 두 번째로 SimpleXML 또는 다른 것과 같은 xml 파서를 사용합니다. –