简体   繁体   English

读写XML文件

[英]Reading and Writing XML file

I have an Application in which first I want to create a backup of message from inbox and store it into backup.xml file which is stored at SDCARD/MYBACKUP/mybackup.xml 我有一个应用程序,首先我要从收件箱创建消息备份并将其存储到backup.xml文件中,该文件存储在SDCARD/MYBACKUP/mybackup.xml

Now I want to retrieve data, stored on SDCARD/MYBACKUP/mybackup.xml and display all messages in listview. 现在我想检索存储在SDCARD/MYBACKUP/mybackup.xml数据,并在listview中显示所有消息。

For Writing XML file to sdcard see this answeer Qberticus's Answer 要将XML文件写入SD卡,请参阅此答复者Qberticus的答案

android Reading file is just simple you have to use Xml parsing See This for XML parsing android阅读文件很简单你必须使用Xml解析请参阅这个用于XML解析

To R/W Sdcard You have to give Permission 到R / W Sdcard你必须给予权限

   <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM