XML News from Monday, July 25, 2005

This morning I was reminded yet again of why XML is a vastly superior format to plain text. I wasted at least an hour trying to troubleshoot a problem that in the end came down to this. My cvspserver file was

service cvspserver {
        disable = no
        socket_type     = stream
        wait            = no
        user            = root
        server          = /sw/bin/cvs
        server_args     = -f --allow-root=/usr/local/CVS pserver
        groups          = yes
        flags           = REUSE
}

It should have been:

service cvspserver
{
        disable = no
        socket_type     = stream
        wait            = no
        user            = root
        server          = /sw/bin/cvs
        server_args     = -f --allow-root=/usr/local/CVS pserver
        groups          = yes
        flags           = REUSE
}

If the difference eludes you, well it eluded me too. This never would have been an issue in XML. The problem is that config files are not plain text. They have embedded markup. It's just that the markup is composed of line breaks, tabs, spaces, and other invisible characters you can't even see. Furthermore, every different tool uses a slightly different markup format, and more often than not that format isn't even documented. The real contest is not between XML and plain text. If it were the first file would have worked. The contest is between reliable, robust, explicit, well-understood, well-documented XML formats and fragile, idiosyncratic, implicit, undocumented formats. When you realize that's the choice, there really is no choice. In 2005 no new config format should be anything other than XML.