XmlPullParser - looking only for "<title>" tag, but result returned for "<media:title>" too
<p>I'm trying to parse an rss feed using the XmlPullParser looking for the <code>&lt;title&gt;</code> tag, if the tag is found, then extract the text inside.<br>
Everything works great for simple rss files, but if the rss feed contains something like this: <code>&lt;media:title type="html"&gt;</code>, the line is processed too. </p>

<p>However this is not the expected result, I'm looking only for <code>&lt;title&gt;</code>, and for <code>&lt;media:title type="html"&gt;</code>.</p>

<p>And my question is how can I modify my code to achieve this, or what am I missing here?</p>

<pre><code>try {

        URL url = new URL("http://androidresearch.wordpress.com/feed/");

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

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

        int eventType = xpp.getEventType();
        while (eventType != XmlPullParser.END_DOCUMENT) {

            if (eventType == XmlPullParser.START_TAG) {
                if (xpp.getName().equalsIgnoreCase("title")) {
                    items.add(xpp.nextText());
                } else if (xpp.getName().equalsIgnoreCase("link")) {
                    // Log.d("GREC", xpp.nextText());
                    links.add(xpp.nextText());
                }
            }

            eventType = xpp.next();
        }

    } catch (MalformedURLException e) {
        e.printStackTrace();
    } catch (XmlPullParserException e) {
        e.printStackTrace();
    } catch (IOException e) {
        e.printStackTrace();
    }
</code></pre>
