How to Display XML data in Custom Listview..?
<p>I am trying to display the parsed xml data in custom listview but the screen appears to be empty. I am trying to add the xml data in a class object and display it in custom listview.
But my class variables are not get assiging the values</p>

<p>List myNews    = new ArrayList();</p>

<pre><code>    try{
        URL url = new URL("http://timesofindia.feedsportal.com/c/33039/f/533916/index.rss");

        XmlPullParserFactory factory = XmlPullParserFactory.newInstance();
        factory.setNamespaceAware(false);
        XmlPullParser xpp = factory.newPullParser();

         xpp.setInput(getInputStream(url), "UTF_8"); 

         boolean insideItem = false;

         int eventType = xpp.getEventType();

         while(eventType != XmlPullParser.END_DOCUMENT){

             if(eventType == XmlPullParser.START_TAG){

                 if(xpp.getName().equalsIgnoreCase("item")){
                     insideItem = true;
                 }
                 else if(xpp.getName().equalsIgnoreCase("title")){
                     if(insideItem){
                         headLines = xpp.nextText().toString();
                     }
                 }
                 else if(xpp.getName().equalsIgnoreCase("link")){
                     if(insideItem){
                         links.add(xpp.nextText());

                     }
                 }
                 else if(xpp.getName().equalsIgnoreCase("pubDate")){
                     if(insideItem){
                         date = xpp.nextText().toString();

                     }
                 }


             }
             else if(eventType == XmlPullParser.END_TAG &amp;&amp; xpp.getName().equalsIgnoreCase("item")){
                 insideItem = false;
             }

             myNews.add(new News(headLines, date));
             eventType = xpp.next();
         }
    }
    catch (Exception e) {
        Log.d("Exception" , e.toString());
    }

    LazyAdapter adapter = new LazyAdapter(this, myNews);
   setListAdapter(adapter);
    ListView listView = getListView();
    listView.setTextFilterEnabled(true);
</code></pre>

<p>Here is my LazyAdapter Code...</p>

<p>public class LazyAdapter extends BaseAdapter {</p>

<pre><code> Activity activity;
 private List&lt;News&gt; myNews;


public LazyAdapter(Activity a, List&lt;News&gt; myNews) {
    this.activity = a;
    this.myNews = myNews;
}

@Override
public View getView(int position, View convertView, ViewGroup parent) {
    News news = myNews.get(position);
    View v = convertView;

    if(v == null){
        LayoutInflater inflater = (LayoutInflater)activity.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
        v = inflater.inflate(R.layout.list, null);
    }

    TextView heading = (TextView)v.findViewById(R.id.textView1);
    heading.setText(news.getTitle());
    TextView pubDate = (TextView)v.findViewById(R.id.textView2);
    pubDate.setText(news.getPubDate());
    heading.setText(news.getTitle());
    pubDate.setText(news.getPubDate());

    return v;
}

@Override
public int getCount() {

    return myNews.size();
}

@Override
public Object getItem(int position) {

    return myNews.get(position);
}

@Override
public long getItemId(int position) {

    return position;
}
</code></pre>

<p>}</p>
