Code example for XmlPullParser

Methods: getText, next, nextTag, require

0
		t.set(0, minute, hour, day, month, year);
		return t;
	} 
 
	private String readDescription(XmlPullParser parser) throws XmlPullParserException, IOException {
		parser.require(XmlPullParser.START_TAG, null, KEY_DESCRIPTION);
		String description = readText(parser);
		parser.require(XmlPullParser.END_TAG, null, KEY_DESCRIPTION);
		return description;
	} 
 
	private String readName(XmlPullParser parser) throws XmlPullParserException, IOException {
		parser.require(XmlPullParser.START_TAG, null, KEY_NAME);
		String name = readText(parser);
		parser.require(XmlPullParser.END_TAG, null, KEY_NAME);
		return name;
	} 
 
	private int readId(XmlPullParser parser) throws XmlPullParserException, IOException {
		parser.require(XmlPullParser.START_TAG, null, KEY_ID);
		String id = readText(parser);
		parser.require(XmlPullParser.END_TAG, null, KEY_ID);
		return Integer.parseInt(id);
	} 
 
	private String readText(XmlPullParser parser) throws XmlPullParserException, IOException{
		String result = "";
		if(parser.next() == XmlPullParser.TEXT){
			result = parser.getText();
			parser.nextTag();
		} 
		return result;
	} 
	 
	private void skip(XmlPullParser parser) throws XmlPullParserException, IOException {