title: How to get XML response by using Retrofit in Android
body: <p>I want to parse XML response by using Retrofit, but i get null response
  and i created model class for its each xml tag. i want to get all response print in logcat just like json response print by using <code>new Gson().toJson(response.body)</code>
  response from web service- </p>
  
  <pre><code>&lt;?xml version="1.0"?&gt;
  &lt;string xmlns="http://tempuri.org/"&gt;
    &lt;NewDataSet&gt;
      &lt;Table&gt;
        &lt;g_Vill&gt;700&lt;/g_Vill&gt;
        &lt;g_Code&gt;47751&lt;/g_Code&gt;
        &lt;g_adhaar_card_no&gt;0&lt;/g_adhaar_card_no&gt;
        &lt;G_Mobile_Number&gt;9616265075&lt;/G_Mobile_Number&gt;
        &lt;g_unique_cd&gt;500109460194&lt;/g_unique_cd&gt;
        &lt;G_Name&gt;Nirmala Devi&lt;/G_Name&gt;
        &lt;F_Name&gt;Jokhan&lt;/F_Name&gt;
        &lt;S_Name&gt;COOP. CANE DEVP. SOC. GHOSI. &lt;/S_Name&gt;
        &lt;C_Name&gt;Karkhiya&lt;/C_Name&gt;
        &lt;V_Name&gt;Roshangunj&lt;/V_Name&gt;
        &lt;bank&gt;Kashi Gomati Bank Ltd&lt;/bank&gt;
        &lt;MD_Mode&gt;TROLLY-GATE&lt;/MD_Mode&gt;
        &lt;g_bquota&gt;149.56600&lt;/g_bquota&gt;
        &lt;g_TArea&gt;0.09700&lt;/g_TArea&gt;
        &lt;g_accnt&gt;111552010001742&lt;/g_accnt&gt;
        &lt;g_T_Bond&gt;48.06800&lt;/g_T_Bond&gt;
        &lt;AvgUpaj&gt;0&lt;/AvgUpaj&gt;
        &lt;crushyear&gt;2017-2018&lt;/crushyear&gt;
        &lt;Branch&gt;ChalakpurAzamgarh&lt;/Branch&gt;
      &lt;/Table&gt;
    &lt;/NewDataSet&gt;
  &lt;/string&gt;
  </code></pre>
  
  <p>i created it's model class by <a href="http://pojo.sodhanalibrary.com/" rel="nofollow noreferrer">XML to JavaPojo class</a></p>
  
  <p>and i get null response </p>
  
  <pre><code>EndPointInterface git = ApiClient.getClient().create(EndPointInterface.class);
              Call&lt;GrowerDetailsResponse&gt; call = git.GrowerDetails("700","47751","1819","8");
              call.enqueue(new Callback&lt;GrowerDetailsResponse&gt;() {
  
                  @Override
                  public void onResponse(Call&lt;GrowerDetailsResponse&gt; call, retrofit2.Response&lt;GrowerDetailsResponse&gt; response) {
                      Log.e("FundRequest", "hello response : " + response.body().getNewDataSet().getTable().getAvgUpaj());
                  }
  
                  @Override
                  public void onFailure(Call&lt;GrowerDetailsResponse&gt; call, Throwable t) {
                      Log.e("response", "error "+t.getMessage());
  
                  }
              });
  </code></pre>