• Home
  • Raw
  • Download

Lines Matching refs:parser

61             XmlPullParser parser = Xml.newPullParser();  in parse()  local
62 parser.setFeature(XmlPullParser.FEATURE_PROCESS_NAMESPACES, false); in parse()
63 parser.setInput(in, null); in parse()
64 parser.nextTag(); in parse()
65 return readFeed(parser); in parse()
79 private List<Entry> readFeed(XmlPullParser parser) in readFeed() argument
90 parser.require(XmlPullParser.START_TAG, ns, "feed"); in readFeed()
91 while (parser.next() != XmlPullParser.END_TAG) { in readFeed()
92 if (parser.getEventType() != XmlPullParser.START_TAG) { in readFeed()
95 String name = parser.getName(); in readFeed()
114 entries.add(readEntry(parser)); in readFeed()
116 skip(parser); in readFeed()
126 private Entry readEntry(XmlPullParser parser) in readEntry() argument
128 parser.require(XmlPullParser.START_TAG, ns, "entry"); in readEntry()
134 while (parser.next() != XmlPullParser.END_TAG) { in readEntry()
135 if (parser.getEventType() != XmlPullParser.START_TAG) { in readEntry()
138 String name = parser.getName(); in readEntry()
141 id = readTag(parser, TAG_ID); in readEntry()
144 title = readTag(parser, TAG_TITLE); in readEntry()
150 String tempLink = readTag(parser, TAG_LINK); in readEntry()
157 t.parse3339(readTag(parser, TAG_PUBLISHED)); in readEntry()
160 skip(parser); in readEntry()
169 private String readTag(XmlPullParser parser, int tagType) in readTag() argument
176 return readBasicTag(parser, "id"); in readTag()
178 return readBasicTag(parser, "title"); in readTag()
180 return readBasicTag(parser, "published"); in readTag()
182 return readAlternateLink(parser); in readTag()
199 private String readBasicTag(XmlPullParser parser, String tag) in readBasicTag() argument
201 parser.require(XmlPullParser.START_TAG, ns, tag); in readBasicTag()
202 String result = readText(parser); in readBasicTag()
203 parser.require(XmlPullParser.END_TAG, ns, tag); in readBasicTag()
210 private String readAlternateLink(XmlPullParser parser) in readAlternateLink() argument
213 parser.require(XmlPullParser.START_TAG, ns, "link"); in readAlternateLink()
214 String tag = parser.getName(); in readAlternateLink()
215 String relType = parser.getAttributeValue(null, "rel"); in readAlternateLink()
217 link = parser.getAttributeValue(null, "href"); in readAlternateLink()
220 if (parser.nextTag() == XmlPullParser.END_TAG) break; in readAlternateLink()
229 private String readText(XmlPullParser parser) throws IOException, XmlPullParserException { in readText() argument
231 if (parser.next() == XmlPullParser.TEXT) { in readText()
232 result = parser.getText(); in readText()
233 parser.nextTag(); in readText()
243 private void skip(XmlPullParser parser) throws XmlPullParserException, IOException { in skip() argument
244 if (parser.getEventType() != XmlPullParser.START_TAG) { in skip()
249 switch (parser.next()) { in skip()