I'm interested in converting some programs I've written for personal use to utilize XML as a "configuration file" format. Currently, I'm using delimited text documents to define input records for a project management tool written in Tcl/Tk. The program opens the configuration file, reads all of the data into internal arrays and lists, then uses the definitions gleaned from the input file. When a change occurs, the change is stored in memory and eventually written to disk when the user asks to save the configuration.
I've wanted to expand the program, but end up spending a lot of time rewriting the parser logic in order to add additional values to the "configuration file".
So, this brings me to XML. I've begun using the Tcl xml package, but don't quite understand the philosophy of the SAX-like parser. It seems to me, at this early stage, that XML isn't much more sophisticated than a delimited text document. Using a SAX parser I'm still required to read the entire document into memory, use the data, and then re-write the document to disk when a change is made.
Am I correct in my assumption, or is there something more useful XML can provide that a text file can't?
I've wanted to expand the program, but end up spending a lot of time rewriting the parser logic in order to add additional values to the "configuration file".
So, this brings me to XML. I've begun using the Tcl xml package, but don't quite understand the philosophy of the SAX-like parser. It seems to me, at this early stage, that XML isn't much more sophisticated than a delimited text document. Using a SAX parser I'm still required to read the entire document into memory, use the data, and then re-write the document to disk when a change is made.
Am I correct in my assumption, or is there something more useful XML can provide that a text file can't?