Solved

XML file with change control

Posted on 2013-11-19
5
199 Views
Last Modified: 2014-04-10
Hi
I have an xml file used across a web app.
currently an administrator manually edits it in notepad
However it must now be editable by users.
I have created web pages to edit file e.g. add, edit, delete items in file susuccessfullyProblem I have is there is no change control.
E.g. user A deletes entry or edits entry. There is no way to know what old data was.
Is there easy way to manage this, is it a case of saving files with different timestamps ?
Thanks
0
Comment
Question by:rwallacej
5 Comments
 
LVL 13

Accepted Solution

by:
jonnidip earned 500 total points
ID: 39662476
As you pointed, you may think to save a copy of your original file at any user-editing.
This is the most obvious and simplest solution.
You may also think to write your file history to a db table, along with the user that modified it and the date when that edit was done.
As long as you own the code to edit the file (and the file is not manually editable elsewhere), you can do whatever you want.

Regards.
0
 
LVL 16

Expert Comment

by:hjgode
ID: 39663190
I would build a serializable object class around the xml file. That class could generate change history and other stuff for the xml file.
0
 
LVL 16

Expert Comment

by:SriVaddadi
ID: 39664768
You could use FileSystemWatcher class
0
 

Author Comment

by:rwallacej
ID: 39729643
ended up moving to SQL
0
 

Author Closing Comment

by:rwallacej
ID: 39992122
this was ok but did use SQL
0

Featured Post

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Wouldn’t it be nice if you could test whether an element is contained in an array by using a Contains method just like the one available on List objects? Wouldn’t it be good if you could write code like this? (CODE) In .NET 3.5, this is possible…
Browsing the questions asked to the Experts of this forum, you will be amazed to see how many times people are headaching about monster regular expressions (regex) to select that specific part of some HTML or XML file they want to extract. The examp…
This is used to tweak the memory usage for your computer, it is used for servers more so than workstations but just be careful editing registry settings as it may cause irreversible results. I hold no responsibility for anything you do to the regist…
Both in life and business – not all partnerships are created equal. As the demand for cloud services increases, so do the number of self-proclaimed cloud partners. Asking the right questions up front in the partnership, will enable both parties …

895 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now