3 ms·
While I think we are on the same page (I did say XML has strength and weaknesses) I think XML is undervalued for a configuration language particularly if the co
by agentgt 11y ago
While I think we are on the same page (I did say XML has strength and weaknesses) I think XML is undervalued for a configuration language particularly if the configuration language is to be modified by another application or script.
The reason a markup language like XML is actually sort of useful for a configuration is that spacing and comments can be preserved on modification. That is if I modify the XML manually and then modify it with a script (assuming the script is written correctly) I can preserve my formatting and my comments. As far as I understand such is not the case with many formats (I suppose YAML would be the exception albeit I'm not sure if it preserves white space other than the required whitespace).
I have actually had this use come up. I had 20 or so Maven POM files that I had to modify/refactor. It was fairly easy to do because it was XML all while preserving the formatting and comments.
With the exception of massively complex configuration (aka Ansible) I really don't think most users (particularly non-techy) care that XML is slightly more verbose than YAML. Particularly since configuration is not modified that often and again its like HTML (although HTML is a failure technology wise it is ubiquitous).
As for serialization... XML is bad... I can't come up with any devils advocation for that.