I guess to summarize this: why do you want to save stuff in XML on your SD card? If it's for your app's persistence, there's no reason it has to be in XML, it could just as easily be in sharedpreferences (which has an easier API anyway). If you must save data in XML, you can just work the standard xml utilities available in Android. If you google "write xml in android" you get a nice smattering of tutorials on how to do this, and you can come back and ask more targeted api centric questions. For writing to the SD card you'd be best to read this: http://developer.android.com/guide/topics/data/data-storage.html Remember that not all devices (for example, the ever popular Nexus S) have SD cards...
kris On Wed, Feb 22, 2012 at 6:55 AM, moktarul anam <[email protected]> wrote: > Hi Vivek, > I think simple and good solution is android Shared Preferences > > Moktarul > > > On Feb 22, 3:19 pm, vivek elangovan <[email protected]> wrote: >> Hi Moktarul Anam , >> I m not going to save uname and pssword in my >> xml for sample only i gave that.My scenario is if i m entering some >> data i have to save it as xml in my sdcard and i also have to >> retrieve that data. >> >> - Vivek >> >> On Feb 22, 3:09 pm, moktarul anam <[email protected]> wrote: >> >> >> >> >> >> >> >> > Hi Viek, >> >> > saving username and password in sdcard is not a good idea. >> > yes u can same ur xml file to sdcard. use file write >> > usehttp://developer.android.com/guide/topics/data/data-storage.html >> >> > ( i think u have to use java serialize ) >> >> > Moktarul Anam >> >> > On Feb 22, 2:57 pm, vivek elangovan <[email protected]> wrote: >> >> > > Hi Seshu, >> > > i checked the link u referred and its working fine, but >> > > in that sample no xml part is defined what i need is (for eg : in the >> > > same example after login i want to save the username and password as >> > > XML files in my sdcard ) >> >> > > - Vivek >> >> > > On Feb 22, 12:30 pm, Seshu <[email protected]> wrote: >> >> > > > Hi Vivek, >> > > > Used Shared Preferences so that the output data will be saved in xml >> > > > format only. >> >> > > >https://github.com/junal/Android-SharedPreferences/tree/master/Shared... >> >> > > >http://www.tutorials-android.com/learn/How_to_store_and_retrieve_pref... >> >> > > > Thanks and Regards, >> > > > S.Seshu >> >> > > > On Feb 22, 9:55 am, vivek elangovan <[email protected]> wrote: >> >> > > > > Hi members, >> > > > > I want to develope an application where after >> > > > > entering the required input fields i want to save the output data as >> > > > > XML in my local (eg : memory card) . Is there any sample available ? > > -- > You received this message because you are subscribed to the Google > Groups "Android Developers" group. > To post to this group, send email to [email protected] > To unsubscribe from this group, send email to > [email protected] > For more options, visit this group at > http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en

