7 ms·
XML has lots and lots of complexity needed so that you could read the "underlying text" (by stripping elements) and for processing notation extensions. For exa
by clarkevans 13y ago
XML has lots and lots of complexity needed so that you could read the "underlying text" (by stripping elements) and for processing notation extensions. For example, you have attributes for out-of-band information, and, this requires additional escaping and content normalization rules. Comparison has multiple definitions because white-space is significant; or not, depending on context. XML specification is ten times longer; it has dozens of sharp edges you have to memorize in order to use effectively.
If you believe that XML's information model maps onto "any other language" just as well as JSON, please show me native mapping/object support in XML and, conversely which programming languages (besides XSLT) have mixed content and attributes.
- corresation 13y agoIf you believe that XML's information model maps onto "any other language" just as well as JSON, please show me native mapping/object support in XML and, conversely which programming languages (besides XSLT) have mixed content and attributes. You can serialize to/from XML in virtually any modern language. Not sure if you're seriously asking this, or what the limiter "native" is supposed to mean (beyond that JSON is JavaScript. But it isn't C#, and it isn't Python, and it isn't...). How they use attributes or elements is context specific. Every feature and pattern doesn't apply to every use. XML specification is ten times longer; it has dozens of sharp edges you have to memorize in order to use effectively. No, you actually don't. You create an XSD of a simple layout (trivial, monkey work). That is what you serialize from/to. The universe of possibilities in XML is, again, utterly and absolutely irrelevant. Seriously, JSON doesn't even have a DATE type. That is so fundamentally broken I don't even know where to start (Microsoft has their own mystical blend of date when they use JSON, for instance, incompatible with anything else).