Reading and writing an XML file

I have an application in which first I want to backup the message from the inbox and save it in the backup.xml file, which is stored in SDCARD/MYBACKUP/mybackup.xml

Now I want to get the data stored on SDCARD/MYBACKUP/mybackup.xml and display all the messages in the list.

+6
source share
1 answer

To write an XML file on an SD card, see this answerber answer by Qberticus

The android reading file is just simple, you need to use Xml parsing . See this for XML parsing.

In R / W Sdcard you must provide permission

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

Source: https://habr.com/ru/post/908305/


All Articles