private List<Entry> readFeed(XmlPullParser parser) throws XmlPullParserException, IOException, ParseException {
  List<Entry> entries=new ArrayList<>();
  parser.require(XmlPullParser.START_TAG,ns,"feed");
  while (parser.next() != XmlPullParser.END_TAG) {
    if (parser.getEventType() != XmlPullParser.START_TAG) {
      continue;
    }
    String name=parser.getName();
    if (name.equals("entry")) {
      entries.add(readEntry(parser));
    }
 else {
      skip(parser);
    }
  }
  return entries;
}

private List < Entry > readFeed ( XmlPullParser parser ) throws XmlPullParserException , IOException , ParseException { List < Entry > entries = new ArrayList < > ( ) ; parser . require ( XmlPullParser . START_TAG , ns , "feed" ) ; while ( parser . next ( ) != XmlPullParser . END_TAG ) { if ( parser . getEventType ( ) != XmlPullParser . START_TAG ) { continue ; } String name = parser . getName ( ) ; if ( name . equals ( "entry" ) ) { entries . add ( readEntry ( parser ) ) ; } else { skip ( parser ) ; } } return entries ; }
decode a feed attached to an xmlpullparser .
