Question

I'm making a windows phone 7 app that makes use of xml based data. I understand that I can prepackage xml files with the app (as part of the application content) and deploy them along with the XAP.

In future if I have to update the XML's on account of updated / changed data, what are the options I have?

Can I build in a method to have the user download the file? Will it overwrite the existing file?

If not, what are the other options I have if I choose to let the user download an updated XML file alone instead of asking the user to update the entire application?

Was it helpful?

Solution

I had a similar problem in the past, and this was my solution:

  • Bundle the XML files with the app as Content (so it got into the .xap file)
  • Everytime I run the app, I do two things:
    • Check if a XML files are on IsolatedStorage; if they are not (first run), copy them from the app data source folder to IsolateStorage
    • Check if the files that are now in the IsolatedStorage need to be updated; if so, download the new versions and update the IsolatedStorage.
  • Only use the XML files that are on IsolatedStorage
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top