Code example for XmlPullParser

Methods: getTextnextnextTagrequire

	protected abstract I parse(InputStream in) throws XmlPullParserException, IOException;
	// Processes tag in the feed. 
	protected String readTag(XmlPullParser parser, String name)
			throws IOException, XmlPullParserException { 
		parser.require(XmlPullParser.START_TAG, ns, name);
		String tag = readText(parser);
		parser.require(XmlPullParser.END_TAG, ns, name);
		return tag;
	// For the tags title and summary, extracts their text values. 
	protected String readText(XmlPullParser parser) throws IOException,
			XmlPullParserException { 
		String result = "";
		if ( == XmlPullParser.TEXT) {
			result = parser.getText();
		return result;
	// Skips tags the parser isn't interested in. Uses depth to handle nested