FileDocCategorySizeDatePackage
XmlSubscribedFeedsGDataParser.javaAPI DocAndroid 1.5 API2735Wed May 06 22:41:16 BST 2009com.google.wireless.gdata.subscribedfeeds.parser.xml

XmlSubscribedFeedsGDataParser

public class XmlSubscribedFeedsGDataParser extends com.google.wireless.gdata.parser.xml.XmlGDataParser
GDataParser for a subscribed feeds feed.

Fields Summary
Constructors Summary
public XmlSubscribedFeedsGDataParser(InputStream is, XmlPullParser parser)
Creates a new XmlSubscribedFeedsGDataParser.

param
is The InputStream that should be parsed.
throws
ParseException Thrown if a parser cannot be created.

        super(is, parser);
    
Methods Summary
protected com.google.wireless.gdata.data.EntrycreateEntry()

        return new SubscribedFeedsEntry();
    
protected com.google.wireless.gdata.data.FeedcreateFeed()

        return new SubscribedFeedsFeed();
    
protected voidhandleExtraElementInEntry(com.google.wireless.gdata.data.Entry entry)

        XmlPullParser parser = getParser();

        if (!(entry instanceof SubscribedFeedsEntry)) {
          throw new IllegalArgumentException("Expected SubscribedFeedsEntry!");
        }
        SubscribedFeedsEntry subscribedFeedsEntry =
                (SubscribedFeedsEntry) entry;
        String name = parser.getName();
        if ("feedurl".equals(name)) {
          FeedUrl feedUrl = new FeedUrl();
          feedUrl.setFeed(parser.getAttributeValue(null  /* ns */, "value"));
          feedUrl.setService(parser.getAttributeValue(null  /* ns */, "service"));
          feedUrl.setAuthToken(parser.getAttributeValue(null  /* ns */, "authtoken"));
          subscribedFeedsEntry.setSubscribedFeed(feedUrl);
        }
        if ("routingInfo".equals(name)) {
            subscribedFeedsEntry.setRoutingInfo(
                    XmlUtils.extractChildText(parser));
        }
        if ("clientToken".equals(name)) {
            subscribedFeedsEntry.setClientToken(
                    XmlUtils.extractChildText(parser));
        }