try {
XmlPullParser xpp = XmlPullParserFactory.newInstance().newPullParser();
xpp.setInput(in, "utf-8");
int event = xpp.getEventType();
while (event != XmlPullParser.END_DOCUMENT) {
switch (event) {
case XmlPullParser.START_TAG:
if (xpp.getName().equals("folder")) {
mFolders.add(xpp.getAttributeValue(null, "name"));
}
break;
}
event = xpp.next();
}
} catch (XmlPullParserException e) {
Log.e(TAG, "XML parser error when parsing XML", e);
} catch (IOException e) {
Log.e(TAG, "I/O error when parsing XML", e);
}