Android : XML Parser for a the stored in SharedPreferences

on Saturday, July 5, 2014


In my application, I've been able to successfully store the favorite contacts on to the SharedPreferences in to a file named "PACKAGE.xml' in the default location --> data/data/applicationpackage..../sharedprefs/PACKAGE. And Currently, the XML looks like below:



<?xml version="1.0" encoding="UTF-8" standalone="true"?>
-<map>
<string name="CONTACT 0">Helen : (432) 341-1343</string>
<string name="CONTACT 2">Alex Zun : 1 234-321-231</string>
<string name="CONTACT 1">Gazer : 1 312-345-452</string>
</map>


I need a help on a sample code for the above XML which will parse the data shown above. I've been trying to do that but no success. If someone can throw some light and help me that would be gr8. Later I would like to put this data on to the ListView and in a custom row layout.


Thanks for the help.


0 comments:

Post a Comment