You should really read Eric Raymond's The Art of Unix Programming sometime. You seem to be making the assumption that the Unix designers would have used XML for /etc/fstab
if they had known about it. On the contrary, although XML specifically had not been invented, they were quite aware of its similar predecessors, and deliberately rejected them for configuration files like /etc/fstab
.
Quoting from his subsection on XML:
XML is well suited for complex data formats (the sort of things for which the old-school Unix tradition would use an RFC-822-like stanza format) though overkill for simpler ones. It is especially appropriate for formats that have a complex nested or recursive structure of the sort that the RFC 822 metaformat does not handle well.
and farther down:
The most serious problem with XML is that it doesn't play well with traditional Unix tools. Software that wants to read an XML format needs an XML parser; this means bulky, complicated programs. Also, XML is itself rather bulky; it can be difficult to see the data amidst all the markup.
The Unix philosophy is to make configuration easily scriptable and human readable wherever possible. You should be able to process config files with tools like awk, grep, sed, tr, and cut, and easily parse them in scripting languages without bulky libraries. This is a huge reason behind Unix's success and should not be underestimated.
Although Eric Raymond praises XML for its ability to handle "formats that have a complex nested or recursive structure," /etc/fstab
certainly has no need for those, and therefore the simplest file format possible was chosen for it.
So although XML certainly has its uses, you might want to consider that some of the smartest programmers on the planet who pioneered the field might have known what they were doing. Perhaps XML isn't always the best fit for your own configuration files.
/usr/lib/libxml.so
and/usr
on separate partition? In order to parse/etc/fstab
system would have to mount/usrz in order to load
libxml, but to do so it would have to parse
/etc/fstab` in order to know which filesystem to mount. In order to avoid this, XML parser would probably have to be part of kernel which doesn't sound like fantastic idea. – el.pescado - нет войне Mar 16 '14 at 15:11UNIX & Linux Stack Exchange
, unix.stackexchange.com. Both would probably be OK, and there are already answers here, but just throwing it out for the future. – trysis Mar 16 '14 at 16:22