0
所以,我有以下幾點:數據提交到一個數組被拉到後
NodeList nodeList = element.getElementsByTagName("rowset");
if (nodeList.getLength() > 0) {
for (int i = 0; i < nodeList.getLength(); i++) {
Element entry = (Element) nodeList.item(i);
Element _titleE = (Element) entry.getElementsByTagName("row").item(0);
Node _title = _titleE.getAttributes().getNamedItem("name");
t1.setText(_title.getNodeValue());
}
}
我有下面的XML佈局:
<row name="" characterID="" corporationName="" corporationID="" />
(這些夫婦行)
理想的方法是創建一個數組嗎?然後從數組中調用數據?
編輯: 我想要做的是讀取一個XML文件並存儲值,以便他們可以稍後訪問,所以我假設理想的方式是使用數組?
理想的做法是什麼? – Falmarri 2010-11-24 00:41:02