1 person found this helpful
In that case you would:
- include the whitelist plugin in your config
- whitelist the external file's location
- wait for the deviceready event to fire
- then perform an ajax request for the xml data
- parse and display as desired
thank you but after the file is available offline?
Well, if you want that file to be available offline, why don't you include it in your assets?
If you want it to be always the latest version, it shouldn't be stored offline.
However, if you don't care what version of the file is kept on the device AND you don't want it to be the initial version that came with the package (which seems a strange requirement to me) then you could store the xml file locally using the file plugin OR in localStorage (whichever you prefer) and retrieve it from that local storage location whenever the user's device is offline.
I develop an app who must be used in off line area and I should update some info every days
so i need to stock xml and jpg in the phone automatically
If you need the file offline, save it to your device's persistent storage (Use the File API or File Transfer plugin). Then, when your user is online, check for new data and update your local copy as necessary.