You can follow
this guide here, and Slick actually has a built in way of saving through Muffin, however I don't have experience with Muffin and I used my own way to save files.
The idea is to create your file, be it with an XML parser or otherwise, and create the file there. What I had to do was have two sections of code, one for saving on desktop and the other for Android devices, and comment out the section I wasn't using. For saving you can use a File object and choose the path.
For desktop, you can give it any path from the root, and it would look like:
Code:
File fExample = new File("/Android/data/package.name/" + filename);
And for Android, you should be saving it to the SD card under /Android/data/package.name, but to get to that you need to use an Environment variable like so:
Code:
File fExample = new File((Environment.getExternalSttorageDirectory() + "/Android/data/package.name/" + filename);
After that you can create your file and save it like you would for any other Java program. To open the file you created, you can access it the same way as you created the file.
Creating your files in the proper structure will allow for those files to be removed from the device when the user uninstalls your application.
Under your Android project, you also need to add this line to your AndroidManifest.xml:
Code:
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
Hope this helps.