Take a look at Google's page regarding data storage on Android.
http://developer.android.com/guide/topics/data/data-storage.html
You can download the XML file in a pretty straightforward matter. Another question like yours was asked here:
Download a file with Android, and showing the progress in a ProgressDialog
In that example, the file gets saved to the SD card. Be sure to change the OutputStream pointing to the SD card, so that it points to the private storage, as the reference page describes:
FileOutputStream fos = openFileOutput(your_xml_filename, Context.MODE_PRIVATE);
To make the switch to the new XML as simple as possible, I'd encapsulate all XML-related functionality in one class and provide a simple method for switching to the new XML. For example,
class XMLUser {
private Location someLocation;
public XMLUser(String pathToXml) {
readxmlAndSetLocations(pathToXml);
}
}
Then you'd initialize a new XMLUser object whenever you'd need to change the XML file. Like so:
XMLUser xmlStuff = new XMLUser(PATH_TO_RES_FILE);
//... do something with it
//... update found
XMLUser xmlStuff = new XMLUser(PATH_TO_PRIVATEDATA_FILE);
Another way would be to use the same object and just update the locations from the XML file:
class XMLUser {
private Location someLocation;
public void updateLocations(String pathToXml) {
//Read your xml here and update the locations accordingly.
}
}
e.g.
XMLUser xmlStuff = new XMLUser(PATH_TO_RES_FILE);
//... do something with it
//... update found
xmlStuff.updateLocations(PATH_TO_UPDATED_XML);
Your questions allow for a wide variety of answers so I can't give a quick and exact one.
And yes, I do recommend saving the XML data to the internal storage. The XML file should be small enough in size to not pose problems, and logically, it's related to the internal functionality of the app. With which the user should not tamper. Plus, the internal storage is not removable, so in case the user changes the SD card, the updated data will still be there.