3 ms·
Except what if "characteristics within that structure" also have structure? Attributes are an ugly, crippled special case of a tree node; they make some sense i
by TeMPOraL 11y ago
Except what if "characteristics within that structure" also have structure? Attributes are an ugly, crippled special case of a tree node; they make some sense in a markup language, but for serializing data, I see zero point in using them.
As for why UIs are represented in XML? It seems like a simple case of people getting used to it before JSON was popular. XML is a default choice for Java and for C#. It also looks vaguely familiar to HTML.
- jtmarmon 11y agoAgreed, they're not convenient for arbitrary attributes. I think where they shine are using a well defined preset of attributes to define structure. Regarding the legacy thing, I think it's both. If you look at a lot of new tooling coming out that has to store UI state, people are still using XML