|
|
|
|
|
by olavk
6512 days ago
|
|
You are right about text-editors. XML was designed to be reasonable easy to write and edit by humans without specialized software. The redundant end-tag helps to catch errors and make structure more explicit. Sure everyone could just use a fancy specialized editor with paren-matching auto-indentation. But one of the goals of XML was precisely that it should not rely on specialized software to be able to read and write. Your example with the table is a lot clearer with sexpr syntax because you don't actually have any content in the table. Try again with a few sentences of mixed content, some bolded words, a link, and so on, and you will get my point. Note that you would also need to gzip your s-expressions if you are concerned about size. |
|
But one of the goals of XML was precisely that it should not rely on specialized software to be able to read and write.
But this is the problem with XML... it does rely on special libraries to validate and parse into reasonable data structures. It requires special heuristics to describe how to recover nicely in the event that markup isn't valid. It requires a document describing exactly what the XML needs to look like.
S-expressions are easier to parse, less verbose, and can accomplish all the same tasks and more, all while being more flexible in general.