Subject: Re: XML config file
To: None <>
From: James K. Lowden <>
List: tech-userlevel
Date: 07/08/2006 15:12:10
Iain Hibbert wrote:
> On Tue, 4 Jul 2006, Magnus Eriksson wrote:
> >   In that case, go with XML all the way.  Convert all config files in
> >   the
> > whole system to XML, have command line tools that manipulate XML the
> > way we now use grep, awk, etc to manipulate text, include an XML
> > parser library in the base system that anyone can use in their
> > programs, include good documentation on all the above, etc.

I assume this is just castles in the air, that no one is seriously
considering converting /etc to a collection of XML files.  

But if one were to consider such a thing, would it not make better sense
to take advantage of 20-odd years of experience, and use a relational
database instead?  

I know, it's too much, too big, too heavy, too complex.  Fine, except
SQLite is in the public domain and has a tiny footprint.  SQL is certainly
better suited to manipulating sets of data than are awk & friends, and
better at describing constraints than plain text or a DTD.  Yes, XPath is
a query language with some nice features, but just try getting any file to
enforce any kind of consistency.  (Is the user's shell acceptable?  Are
all users in /etc/group also in /etc/passwd? Who is in group A and not in
group B?)  

I fully expect any suggestion of introducing an RDBMS into the base system
to be met with derision.  Maybe it should be.  But that at least would be
a system designed to store data, manipulate them, and present them in
human-readable form (without the need for a full-screen editor).  That's
more than I can say for XML.