Revision: 36790
Initial Code
Initial URL
Initial Description
Initial Title
Initial Tags
Initial Language
at November 26, 2010 19:24 by noklpopl
Initial Code
private void ParseConfigFile() throws XmlPullParserException, IOException { XmlResourceParser parser = getResources().getXml(R.xml.config); parser.next(); int eventType = parser.getEventType(); while (eventType != XmlPullParser.END_DOCUMENT) { if(eventType == XmlPullParser.START_DOCUMENT) { //stringBuffer.append("--- Start XML ---"); } else if(eventType == XmlPullParser.START_TAG) { //stringBuffer.append("\nSTART_TAG: "+xpp.getName()); } else if(eventType == XmlPullParser.END_TAG) { //stringBuffer.append("\nEND_TAG: "+xpp.getName()); } else if(eventType == XmlPullParser.TEXT) { //stringBuffer.append("\nTEXT: "+xpp.getText()); } eventType = parser.next(); } parser.close(); }
Initial URL
http://www.nookl.com
Initial Description
Initial Title
Android pull parser sample
Initial Tags
xml, android
Initial Language
Java