Code example for XmlPullParser

Methods: getName, getNamespace, getPrefix

0
        // Make sure we end at item tag 
        parser.require(XmlPullParser.END_TAG, "", RSS.ITEM);
    } 
 
    private boolean isContentEncodedTag(XmlPullParser parser) {
        return RSS.CONTENT_ENCODED.equals(parser.getName()) &&
                RSS.CONTENT_NAMESPACE.equals(parser.getNamespace(parser.getPrefix()));
    } 
 
    private URL createMediaUrl(String url) {
        try { 
            return new URL(url);
        } catch (MalformedURLException e) {
            Log.e(getClass().getSimpleName(), "Episode has invalid URL", e);
        } 
 
        return null; 
    } 
 
    private Date parsePubDate(String value) {
        try {