Code example for XmlPullParser

Methods: nextText

0
    } 
 
    private void loadName(XmlPullParser parser) throws XmlPullParserException, IOException {
        // Only update the name if not set 
        if (name == null)
            name = Html.fromHtml(parser.nextText().trim()).toString();
    } 
 
    private void loadImage(XmlPullParser parser) throws XmlPullParserException, IOException {
        try { 
            // HREF attribute used? 
            if (parser.getAttributeValue("", RSS.HREF) != null)
                logoUrl = createLogoUrl(parser.getAttributeValue("", RSS.HREF));
            // URL tag used! We do not override any previous setting, because 
            // the HREF is from the <itunes:image> tag which tends to have 
            // better pics. 
            else if (logoUrl == null) {
                // Make sure we start at image tag 
                parser.require(XmlPullParser.START_TAG, "", RSS.IMAGE);
 
                // Look at all start tags of this image