Click to See Complete Forum and Search --> : when to read configuration file


Vivek788
September 13th, 2009, 11:14 PM
Hi all..i have doubt abt the use of configuration files.
I am working on an application which needs to read a variable from an xml configuration file. The value is valid only when a particular event is raised by the user.
Which is a good design solution? To go for initial read using SAX or provide the user with a mechanism to write to the xml when that event is raised and then continue with the operation using DOM?
I feel SAX being simple and light on memory must be implemented for this..but then am not so sure if its a user friendly solution to make the user edit config files before loading application.

pls reply soon

Arjay
September 14th, 2009, 01:57 PM
What environment is your app running in? What technologies are you using?

Vivek788
September 17th, 2009, 02:35 AM
i am developing code in visual studio integration for qt...
C++ is language.

Arjay
September 17th, 2009, 05:21 PM
If the application has a UI, why not let the user make the change in the application?

Underneath the covers, you can write the users changes to the xml and reread the xml file.

If the xml file is small, just read the file with the DOM.