>It would be cumbersome and error-prone to try to download this HTML, parse it and try to extract information from it
This is the crux of the problem. Also the reason XML fell out of favor and lead to a massive and still incomplete reinvention of the wheel in the form of JSON schema etc.
Imagine a client side programming language for which a valid html snippet is simply the serialization of an object. And vice versa. No parsing required.
The point is that much of the web has been shaped by the adoption of javascript as the exclusive browser side programming language.
This is the crux of the problem. Also the reason XML fell out of favor and lead to a massive and still incomplete reinvention of the wheel in the form of JSON schema etc.
Imagine a client side programming language for which a valid html snippet is simply the serialization of an object. And vice versa. No parsing required.
The point is that much of the web has been shaped by the adoption of javascript as the exclusive browser side programming language.