XML is touted as an external format for representing data. This is not a hard problem. All we require are two properties:
• Self-describing From the external representation one should be able to derive the corresponding internal representation.
• Round-tripping If one converts from an internal representation to the external representation and back again, the new internal representation should equal the old.
Lisp S-expressions, for example, possess these properties.
XML has neither property. It is not always self-describing, since the internal format corresponding to an external XML description depends crucially on the XML Schema that is used for validation (for instance, to tell whether data is an integer or a string). And it is not always round-tripping, since some pathological Schemas lack this property (for instance, if there is a type union of integers and strings). So the essence of XML is this: the problem it solves is not hard, and it does not solve the problem well.
https://homepages.inf.ed.ac.uk/wadler/papers/xml-essence/xml-essence.pdf