Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>You can parse using <strong>Gson parser</strong>. So first download <strong>gson-1.1.jar</strong> file from <a href="http://findjar.com/jar/com/google/code/gson/gson/1.1/gson-1.1.jar.html" rel="nofollow">http://findjar.com/jar/com/google/code/gson/gson/1.1/gson-1.1.jar.html</a></p> <p>and then add jar file into your project build path then use the below code for parsing (Simple replace your parsing code with below code)</p> <pre><code> try { HttpClient httpclient = new DefaultHttpClient(); HttpPost httppost = new HttpPost("http://www.taxmann.com/TaxmannWhatsnewService/Services.aspx?service=getStatutesTabNews"); HttpResponse response = httpclient.execute(httppost); HttpEntity entity = response.getEntity(); String data = EntityUtils.toString(entity); Gson gson = new Gson(); Type collectionType = new TypeToken&lt;List&lt;NewsData&gt;&gt;(){}.getType(); List&lt;NewsData&gt; details = gson.fromJson(data, collectionType); } catch (Exception e) { Log.i("error","error"); e.printStackTrace(); } </code></pre> <p>bean for above code is</p> <pre><code>public class NewsData { private String news_id = null; private String news_title = null; private String news_short_description = null; private String news_date = null; public String getNews_id() { return news_id; } public void setNews_id(String newsId) { news_id = newsId; } public String getNews_title() { return news_title; } public void setNews_title(String newsTitle) { news_title = newsTitle; } public String getNews_short_description() { return news_short_description; } public void setNews_short_description(String newsShortDescription) { news_short_description = newsShortDescription; } public String getNews_date() { return news_date; } public void setNews_date(String newsDate) { news_date = newsDate; } } </code></pre> <p>and add internet permission in your manifest </p> <pre><code>&lt;uses-permission android:name="android.permission.INTERNET" /&gt; </code></pre> <p>I hope this will help you.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload