RSS Reader not getting Feed
<p>In my RSS Reader, my <code>feed = getFeed(RSSFEEDOFCHOICE);</code> is always <code>null</code>. Please have a look at my code below.</p>

<pre><code>public class RssReaderActivity extends Activity implements OnItemClickListener {
    public final String RSSFEEDOFCHOICE = "http://www.vogella.de/article.rss";
    private RssFeedActivity feed = null;

    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);

        feed = getFeed(RSSFEEDOFCHOICE);

        UpdateDisplay();
    }

    private RssFeedActivity getFeed(String urlToRssFeed) {
        try {
            URL url = new URL(urlToRssFeed);

            InputSource is = new InputSource(url.openStream());


            SAXParserFactory factory = SAXParserFactory.newInstance();
            SAXParser parser = factory.newSAXParser();
            XMLReader reader = parser.getXMLReader();
            RssHandlerActivity rssHandler = new RssHandlerActivity();
            reader.setContentHandler(rssHandler);

            reader.parse(is);
            return rssHandler.getFeed();
        } catch(Exception e) {
            return null;
        }
    }

    public boolean onCreateOptionsMenu(Menu menu) {
        super.onCreateOptionsMenu(menu);
        menu.add(0, 0, 0, "Choose RSS Feed");
        menu.add(0, 1, 1, "Refresh");
        return true;
    }

    public boolean onOptionsItemSelected(MenuItem item) {
        switch(item.getItemId()) {
        case 0:
            return true;
        case 1:
            return true;
        }
        return false;
    }

    private void UpdateDisplay() {
        TextView feedTitle = (TextView) findViewById(R.id.feedtitle);
        TextView feedPubdate = (TextView) findViewById(R.id.feedpubdate);
        ListView itemList = (ListView) findViewById(R.id.itemlist);

        if(feed == null) {
            feedTitle.setText("No RSS Feed");
            return;
        }

        feedTitle.setText(feed.getTitle());
        feedPubdate.setText(feed.getPubDate());

        ArrayAdapter&lt;RssItemActivity&gt; adapter = new ArrayAdapter&lt;RssItemActivity&gt;(this, android.R.layout.simple_list_item_1, feed.getAllItems());
        itemList.setAdapter(adapter);
        itemList.setOnItemClickListener(this);
        itemList.setSelection(0);
    }

    public void onItemClick(AdapterView&lt;?&gt; parent, View v, int position, long id) {
        Intent i = new Intent(this, ShowDescriptionActivity.class);
        Bundle b = new Bundle();
        b.putString("title", feed.getItem(position).getTitle());
        b.putString("description", feed.getItem(position).getDescription());
        b.putString("link", feed.getItem(position).getLink());
        b.putString("pubdate", feed.getItem(position).getPubdate());

        i.putExtra("android.intent.extra.INTENT", b);
        startActivityForResult(i, 0);
    }
}
</code></pre>
