Code example for XmlPullParser

Methods: getEventType, nextTag, nextText

0
		//Log.d("fox", "Start element: " + name); 
	} 
	 
	  private String safeNextText(XmlPullParser parser)
	          throws XmlPullParserException, IOException { 
	      String result = parser.nextText();
	      if (parser.getEventType() != XmlPullParser.END_TAG) {
	          parser.nextTag();
	      } 
	      return result;
	  } 
 
	private static final String ns = null;
    public static final String FILENAME = "history.xml";
     
    public static final String TAG_ACTIVITY = "activity";
    public static final String TAG_DAY = "day";
    public static final String TAG_DATE = "date";
    public static final String TAG_NAME = "name";
    public static final String TAG_TIME = "time";
    public static final String TAG_PRODUCTIVE = "productive";