1
我想列出所有在Android 4.0中的標記的值截至目前我能夠得到只有一個值我已經添加了我現在使用的片段&也xml below.Please幫助這個與片段或example.Thanks很多。如何從android 4.0中的子節點獲取所有值?
NodeList nodes = doc.getElementsByTagName("month");
對(INT I = 0;我< nodes.getLength();我++){
Element e = (Element) nodes.item(i);
stock_list.add(getValue(e, "month"));
}
Here is my xml
在循環內部添加'Log.i(e.toString())'。它輸出什麼?你的方法'getValue'(你沒有向我們展示過)做什麼? – Heinzi 2012-08-01 05:20:37
有沒有其他方法可以獲得標記的所有值。 –
Karthik
2012-08-01 05:29:02
'e.getTextContent()'? – Heinzi 2012-08-01 05:41:55