2010-09-14 13 views

Répondre

1
try { 
     HttpClient client = new DefaultHttpClient(); 
     String getURL = <URL>; 
     HttpGet get = new HttpGet(getURL); 
     HttpResponse responseGet = client.execute(get); 
     mResEntityGet = responseGet.getEntity(); 
     if (mResEntityGet != null) { 
      //do something with the response 
      content = EntityUtils.toString(mResEntityGet); 
     } 
    } catch (Exception e) { 
     e.printStackTrace(); 
    } 

"contenu" sera la chaîne de format XML, analyser à l'aide de l'analyseur pull XML.