title: How to get response as XML Document with Apache Httpclient api?
body: <p>I can receive the response. How can I get the response in a XML document? do I need to use an external XML parser? thanks for any helps</p>
  
  <pre><code>DefaultHttpClient client = new DefaultHttpClient();
  String getUrl = "http://myurl.com";
  
  HttpUriRequest getRequest = new HttpGet(getUrl);
  
  getRequest.setHeader("User-Agent",  "xxxx");
  
   HttpResponse response = client.execute(getRequest);
   int statusCode = response.getStatusLine().getStatusCode();
  
   log.info("statusCode=" + statusCode);
  
   if (statusCode == 200 ){
    HttpEntity entity = response.getEntity();
    String content = EntityUtils.toString(entity);
    log.info("\n" + content);
   }else {
    log.warn("failed to response");
   }
  </code></pre>