Hacker News new | ask | show | jobs
by jamesbritt 5691 days ago
"I get the feeling XML wasn't really made for this case, though, it was made for the JSON-like case."

Back in 1997, XML was "SGML for the Web." It was a way to pass around structured, plain-text, human-readable documents that did not require expensive, buggy, incomplete parsers.

It then got misapplied as an RPC transport encoding, and tools vendors were more than happy to start pushing specs, such as W3C Schemas, that demanded the use of tools.

It started out to be simple, but, as things happen, got hijacked. But the fault is with the misapplication, not XML itself.

2 comments

If you read the annotated xml spec, it really is quality work. I don't necessarily agree with every design decision, but I think a lot of people look at the complexity of xml applications and falsely blame xml itself.

Sadly there were some sensible early formats that were left behind. XML-RPC's serialization is a bit verbose but otherwise is quite similar to JSON. Somehow that got turned into SOAP and then eventually the WS- tar pit of complexity.

Likewise XML as a configuration file language can be quite elegant, almost like a literate coding version of common .ini or .conf files. But instead of this simple flat document littered with variables, xml config files in the wild end up with deeply nested structure that contributes dubious value and makes the files far less human friendly.

XML itself, with the possible exception of namespaces and a few other features, is quite simple. I totally agree it's the applications that have gotten out of hand, particularly in areas where XML is used as structured data exchange rather than document markup.

I guess the reason why this happened was because we didn't have JSON then, so XML looked like the best available option to many people at the time (except for those few who knew about s-expressions).

Now that we have JSON, there is no longer any excuse.