I need to create a Dynamic Data Site, but my data is stored in an XML file rather than a database. The data consists of a single series of records, each with 2 fields. I want to create a Dynamic Data Site to quickly provide the ability to create new records, delete records, and update records (CRUD) over the Internet. I know that it would be best to store the records in a database, but in this case that’s not an option – the data needs to sit in that XML file.
How can I generate a Dynamic Data Site based on an XML file rather than a SQL Server database?
There should not be any difference. Basically you need to implement 4 DAO methods (CRUD) that will work with XML and everything else will be transparent for the rest of application.
There are libraries for many languages that can convert XML to object and then you only need to update object properties and serialize it back to XML. For Java I would use JAXB for example.
Bad thing that you will have to lock file during updates. I.e. if one user updates XML file, others must wait. This means that your site will not be able to serve many users at the same time.