How To Write Data To XML File and Save That XML in Android Application - Stack Overflow
How To Write Data To XML File and Save That XML in Android Application - Stack Overflow
how to write data to xml file and save that xml in android application
Asked 9 years, 7 months ago Active 7 years, 5 months ago Viewed 11k times
i am new developer in android application.i would like to write the data into xml file.i mean i
would like to change the content like elements,tags,data in xml file.i can able to read an xml
2 file in that file, i would like to change or modify and save that xml file.
data1.append(strLine);
data1.append('\n');
System.out.println("--------->"+data1.append(strLine)+"\n");
i have written this code in a method here book.xml is my xml file to change
when i call this method then i am getting out put with tags in logcat as follows
thanks in advance.
https://stackoverflow.com/questions/6340338/how-to-write-data-to-xml-file-and-save-that-xml-in-android-application/6340576 1/2
1/10/2021 how to write data to xml file and save that xml in android application - Stack Overflow
You could write a parser for your xml (use SAX for example) and store it into a object of a
class which represents the fields and values of you xml.
6
Then edit the needed settings in the object and use a xml builder to make a xml file with the
new values.
By using our site, you acknowledge that you have read and understand our Cookie Policy, Privacy Policy, and
our Terms of Service.
https://stackoverflow.com/questions/6340338/how-to-write-data-to-xml-file-and-save-that-xml-in-android-application/6340576 2/2