Configuration File Setup - Need input

debian007

New Member
I am currently using an adhoc xml file to save configuration settings and it's working but it's not where it needs to be.It goes something like this:\[code\]<XmlDoc> <DefaultSettings> <ExitProgramMessage>Y</ExitProgramMessage> <DefaultSettings> <Company> <ExitProgramMessage>N</ExitProgramMessage> <Company> <Workstation> <ExitProgramMessage>N</ExitProgramMessage> </Workstation> <User> <ExitProgramMessage>Y</ExitProgramMessage> <User><XmlDoc>\[/code\]The way the code is written is that the DefaultSettings is read first, then the Company (which overwrites the DefaultSettings), then the Workstation settings (which overwrites the DefaultSettings or Company Settings), then the Workstations, then User... last read wins, with the exception of blanks. They do not clear a fields. In the example above the ExitProgramMessage would end up being Y.I'm running into several problems. [*]I cannot easily add more levels since they are hardcoded[*]I have to read each node manually since it's not in standard xml format which means the file needs to be manually edited, which always causes problems.It's just not easy to use and definitely is not intuitive. So, with that being said, how should I implement this where I can create a screen to update the settings?Is xml the right way to go? Should I go a different route with this? We do not have the option of a database yet, only flat files.Also, these settings reside on a server that has a shared drive where network users access. So, these cannot be settings saved in the registry or anything specific to the user.Any ideas would be greatly appreciated.Thanks!
 
Back
Top