On Tue, 09 Aug 2005 15:12:48 -0700 Jeremy Huddleston
<[EMAIL PROTECTED]> wrote:
| On Tue, 2005-08-09 at 22:19 +0100, Ciaran McCreesh wrote:
| > | but I think having the xml configuration files allows a much more
| > | robust configuration.
| > 
| > How so? Using XML doesn't magically make your data files any
| > different. It simply makes them much harder to parse.
| 
| That's a matter of opinion.

Not really. It's pretty easy to prove that a full XML parser is
computationally more complicated (and hence slower and more bug prone)
than most 'obvious' flat text file formats.

| I see it as a way to abstract away the
| configuration and utilize an existing library to handle the parsing.
| If we do want to eliminate outside dependencies (which I think is an
| extremely valid point and concern), then we could internally
| implement a different configuration format that is easier to parse.

Interacting with an XML library is around the same degree of difficulty
as writing a simple flat text parser. Remember that if you're using
XML, you have to be able to handle *all* the fancy XML nonsense,
including DTD voodoo and processor directives.

The only 'advantages' to XML are that you can partially validate the
syntax (but not the contents) of a file and that by writing a really
complicated XSLT mess you can transform it into a different XML file.
The former is a duff argument because a) the only reason you need
validation is because XML's syntax is so complicated and b) you can't
validate CDATA things anyway. The latter is silly because you can use
sed, grep, cut etc on any sane textfile format, and it's far easier
than XSLT.

| I'd probably go for something similar to the samba/gdm config files
| if we were to go down this road:
<snip>

Much saner.

-- 
Ciaran McCreesh : Gentoo Developer (Vim, Shell tools, Fluxbox, Cron)
Mail            : ciaranm at gentoo.org
Web             : http://dev.gentoo.org/~ciaranm

Attachment: pgp9ZOm5H0UsQ.pgp
Description: PGP signature

Reply via email to