I’m trying to find the best way to store XML files from the internet, so that i can parse them at a later date. I have no problems with downloading an xml file, and storing it in the
/data/data/package_name/files
folder. However i’m not sure how to read this file after it has been saved there, and to pass that read file to an instance of a SAX Parser. Additionally, i have noticed that it is quite slow to read the file from the phone, which is a concern.
I have read the storing XML files in the res/xml folder is a lot quicker – but i’m not sure if it’s possible to save a file from the internet into this folder at runtime?
Any help would be appreciated 🙂
Cheeers
Store it in the cache directory.
so you can say
filename = getCacheDir() + file123.xml;