I need to create a report generation system which sends the reports to a DB. Can I replace the DB with an XML file, so that I don't have to use a server. Is it even possible?
Asked
Active
Viewed 730 times
0
-
If you want multiple users to share the same XML file you'll have to have a server to store that copy. If all you need is one file you might be able to get away with hosting this file on some service like github or dropbox. – Lix Aug 29 '14 at 10:14
-
no, only one user will be accessing the application. – Chandresh singh Aug 29 '14 at 10:16
-
Ok - how does this user access the system? Does it only exist locally on one machine? – Lix Aug 29 '14 at 10:18
-
yeah it exists locally. And actions performed by the user would go into that XML file, can it be done? – Chandresh singh Aug 29 '14 at 10:19
-
If all you have is a single browser running local JavaScript I don't think that there is currently an option to write data to files. – Lix Aug 29 '14 at 10:23
1 Answers
0
You can create an HTML 5 web page that generates an xml file and let the user save it. On the next time the user can supply the page with the last generated xml. Look here: How to open a local disk file with Javascript?
Also, you can use HTML 5 key value store for loading every time the last data file generated.
I would recommend exploring those 2 options, and maybe later on adding a server to store the data.