Danny G
Danny G

Reputation: 1

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.

Upvotes: 0

Views: 1526

Answers (2)

LGAP
LGAP

Reputation: 2453

You should make your application dynamic by creating a new XML file and writing the same to the internal memory that you use for this.

Upvotes: 0

mreichelt
mreichelt

Reputation: 12455

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.

Upvotes: 2

Related Questions