简体   繁体   中英

Read/Write to a Local XML File in Android

I am new to Android and relatively new to Java so please bear with me. I have an XML file stored in the res/xml that I am trying to write to. I know how to read it using XmlResourceParser, but I have not been able to find a way to write to that file locally. Could someone point me in the right direction please.

Simple answer: You can't. The resources of your app are static and can not be modified. You will have to write a new XML file to the SD card or to the internal memory for this.

您应该通过创建新的XML文件并将其写入用于此目的的内部存储器来使应用程序动态化。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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