The lost art of XML
9 hours ago
- #XML
- #data-interchange
- #JSON
- XML was abandoned not due to inadequacy but because JavaScript and browser dominance favored JSON.
- XML offers schemas (XSD) for type checking, namespaces for document composition, and comments for documentation—features JSON lacks.
- JSON lacks built-in validation, namespacing, and comments, leading to ad-hoc solutions and potential errors.
- XML's structure is similar to Lisp's s-expressions, emphasizing nested, tagged data representation.
- Developer convenience over technical merit led to JSON's adoption despite XML's superior features for rigorous data interchange.
- XML separates the conceptual model from serialization, allowing formats like Fast Infoset and EXI for efficient binary encoding.
- The industry ignored binary XML solutions, later creating new formats to address JSON's shortcomings.
- Microsoft's use of XML in complex systems highlights its reliability and suitability for formal data representation.
- The preference for JSON reflects a prioritization of keystroke economy and familiarity over semantic precision and rigor.
- XML's core features—schemas, namespaces, validation—remain sound, offering advantages over JSON for durable, correct data interchange.