[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Using XML to handle all configuration files

>>>>> "Evan" == Evan Prodromou <evan@prodromou.san-francisco.ca.us> writes:

>>>>> "D" == D-Man  <dsh8290@rit.edu> writes:
    D> I think that XML config format would be cool for 2 (main)
    D> reasons:

    Evan> I for one think that XML is unnecessary. All configuration
    Evan> files should be stored as s-expressions instead. Easy to
    Evan> parse, easy to write!

(not sure if you are serious or not here...)

You can't validate s-expressions with DTD, XML-schema or whatever.

Also, I think s-expressions make it difficult to match the correct
right ) with the left (. Sure, a good editor can help, but I prefer
just being able to tell at a quick glance, using less, for instance.

For instance compare

<comment>This is a comment</comment>

<iface name="lo" family="inet" method="loopback"/>

<iface name="eth0" family="inet" method="static">



(comment "This is a comment")
(auto lo)
(auto inet)
(auto loopback)

(iface lo inet loopback)

(iface eth0 inet static

and tell me in 10 seconds or less if the S expression is valid or
what errors exist if it is not...
Brian May <bam@debian.org>

Reply to: