Before XML became a standard and given all its shortcomings, what made XML so popular?

后端 未结 23 686
轻奢々
轻奢々 2021-02-04 09:01

Yes XML is human readable but so is comma delimited text and properties files.

XML is bloated, hard to parse, hard to modify in code, plus a ton of other problems that I

23条回答
  •  一个人的身影
    2021-02-04 09:54

    The primary advantage it bestows is a system independent representation of hierarchical data. Comma delimited text and properties files are more appropriate in many places where XML was used, but the ability to represent complex data structures and data types, character set awareness, and standards document allowed it to be used as a good inter application exchange format.

    My minor improvement suggestion for the language is to change the way end tags work. Just imagine how much bandwidth and disk space would be saved if you could end a tag with , like blah instead of <my_tag>blah. You aren't allowed to have overlapping tags, so I don't know why the standard insists on even more text than it needed. In fact, why use angle brackets at all?

    The ugliness of the angle brackets is a good show of what it could have been: JSON. JavaScript Object Notation achieves most of the goals of XML with a lot less typing. Another alternate syntax that makes XML bearable is the Builder syntax, as used by Groovy and Ruby. It's much more natural and readable.

提交回复
热议问题