Originally posted by: kamper
Originally posted by: BingBongWongFooey
xml isn't really meant for human viewing/editing. If the job requires either, then xml is probably a bad choice. Look how damn noisy that CFMX config file is! No sane person would want to type all that crap by hand.
(although it is tempting for programmers: parsers are such an annoyance to write)
I beg to differ (sheesh, I'm arguing with everyone today :roll: )
Another important part of xml is that it sits nicely in between an ideal computer format and an ideal human readable format. If it was never meant to be read by humans it would probably be binary and not nearly so verbose. I have no trouble reading the posted xml file, perhaps because I'm used to it.
Get a decent xml editor and you get things like automatic tag closure (type "<foo>" and it appends "</foo>"), automatic formatting (because, of course, white space and nesting are of the utmost importance for human readablility) and syntax highlighting. Syntax highlighting is especially handy when the editor can find the dtd or xsd, parse your xml file and tell you when you've created an invalid document and why.
It's the same as editing source code in any programming language. It's a compromise between straight up english and straight up binary.
But I believe n0c's point was that config files in a unix env is not the place for XML, and I tend to agree. I deal with XML config files for some Mac stuff, and its irritating. Having <foo> value </foo> instead of foo=value is retarded, and when you're looking at the files remotely in something like vi it just gets in the way. The indentations don't help either. Maybe if you used a fancy editor with colors and what not it may be easier to read, but admins often do not use such tools.