Pretty soon with the birth of JSON everyone stopped using eval() because of obvious security concerns (eval is evil) and JSON parsers before JSON.parse() were doing the heavy lifting handwritten in JS.
That was also the time when XML/XHTML on the web wasn't as disregarded as today. Browsers are XML parsing software. They exposed JS Interfaces for these XML parsers. And a query interface. And the DOM. Etc.
My thesis: The data to send mostly matches a tree of structs and arrays and values which we use in programming languages. XML is not the perfect vessel for that, it's better used as a document format. XML of course was misused as a configuration format in the decade before, leading to the backlash.
That was also the time when XML/XHTML on the web wasn't as disregarded as today. Browsers are XML parsing software. They exposed JS Interfaces for these XML parsers. And a query interface. And the DOM. Etc.
My thesis: The data to send mostly matches a tree of structs and arrays and values which we use in programming languages. XML is not the perfect vessel for that, it's better used as a document format. XML of course was misused as a configuration format in the decade before, leading to the backlash.