I was wondering how you would go about writing and the reading from an XML file using the Java library Slick2D.
I have googled for the last couple of days and have found nothing succinct and simple that explains what I'm looking for.
I am looking for 3 things:-
- How to create an XML file (would be awesome to be able to search a directory to see if there is an existing file and only create a new file if one does not already exist.
- How to write to the created XML file.
- How to read from the found XML file.
The reason for this is that I'm trying to create a save/load class for a game.
Just a general snippet of code, that I'd be able to modify for my needs would be great even for a learning experience.
So now for my question, does anyone have any information that may help me on my quest to succeed in my above stated three goals?