一個問題不知什麼原因,代碼:
OtherActivity String PaiMaiXML= List<String> data = ArrayList<String> data.add("車牌列表" List<Map<String, Object>> PaiMaiList = ArrayList<Map<String, Object>> Map<String, Object> PaiMaiMap = HashMap<String, Object> ByteArrayInputStream tInputStringStream = (PaiMaiXML != && !PaiMaiXML.trim().equals("" tInputStringStream = XmlPullParser parser = parser.setInput(tInputStringStream, "UTF-8" eventType = (eventType != XmlPullParser.START_DOCUMENT: XmlPullParser.START_TAG: String name = (name.equalsIgnoreCase("Base_tabletNumber" PaiMaiMap.put("title" (name.equalsIgnoreCase("Base_Family" PaiMaiMap.put("info" PaiMaiMap.put("img" PaiMaiMap = HashMap<String, Object> XmlPullParser.END_TAG: eventType = } } SimpleAdapter adapter = SimpleAdapter( String[]{"title","info","img" }
當我把51行的注釋掉就可以了,求真相
改成String wee=parser.nextText(); 也是有問題,難道nextText()的原因。。。
nextText()不能重複執行,具體原因 再研究