Code example for XmlResourceParser

Methods: close, next, nextTag, setFeature

0
	private static final String NAMESPACE = "http://www.w3.org/2005/Atom";
 
	public Map<String,Entry> parse(XmlResourceParser parser) throws DataException  {
		Map<String,Entry> map = null;
		try { 
			parser.setFeature(XmlPullParser.FEATURE_PROCESS_NAMESPACES, true);
		//	Env.debug("parse.nextTag"); 
			parser.next();
			parser.nextTag();
			 
			map = readMap(parser);
		} catch (XmlPullParserException e) {
			Env.error(e);
			encapsula("Xml error",e);
		} catch (IOException e) {
			Env.error(e);
			encapsula("File error",e);
		} finally { 
			parser.close();
		} 
		return map;
	} 
 
	private Map<String,Entry> readMap(XmlPullParser parser) throws IOException, XmlPullParserException {