我怎样才能读取SD卡的XML文件? [英] How can I read an XML file from an SD card?
本文介绍了我怎样才能读取SD卡的XML文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想从Android上的SD卡解析XML文件,我必须展示结果以列表视图格式。我试图用这个code做到这一点:
I want to parse an XML file from an SD card on Android, and I have to show the result in list view format. I tried to do it with this code:
for (int i = 0; i < obj_nod_list.getLength(); i++) {
Node list = obj_nod_list.item(i); String strText =
list.getFirstChild().getNodeValue();
但它导致了 org.apache.harmony.xml.dom.ElementImpl
例外。我究竟做错了什么?
but it results in a org.apache.harmony.xml.dom.ElementImpl
exception. What am I doing wrong?
推荐答案
点击这里,
的http://groups.google.com/group/android-developers/browse_thread/thread/87d7305179d75985
check here,
http://groups.google.com/group/android-developers/browse_thread/thread/87d7305179d75985
这篇关于我怎样才能读取SD卡的XML文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文