You can use sqlite database files for it. You have your own API for reading and writing both of these command line tools.
If you want to create an xml file instead, then it is no different from any other XML file (unless you think about SharedPreferences, which use the xml format to save data, but I believe that this is not the best API for your application).
source share