Code example for XmlPullParserFactory

Methods: newPullParser

0
	 
	public static XmlPullParser newPullParser(InputStream input) throws XmlPullParserException {
		if(factory_ == null){
			factory_ = XmlPullParserFactory.newInstance();
		} 
		final XmlPullParser parser = factory_.newPullParser();
		parser.setInput(input, null);
		return parser;
	} 
	 
    /** 
     * Query and return the {@link SyncColumns#UPDATED} time for the requested 
     * {@link Uri}. Expects the {@link Uri} to reference a single item. 
     */ 
    public static long queryItemUpdated(Uri uri, ContentResolver resolver) {
        final String[] projection = { SyncColumns.UPDATED };
        final Cursor cursor = resolver.query(uri, projection, null, null, null);
        try { 
            if (cursor.moveToFirst()) {
                return cursor.getLong(0);
            } else {