[racket] Help with sockets.

From: Danny Yoo (dyoo at hashcollision.org)
Date: Wed Apr 30 15:56:03 EDT 2014

> XML is harder for almost everyone to deal with than JSON is.  Sometimes it
> seems like almost no one designing XML schemas (mainly ad-hoc) uses XML in a
> way more sophisticated than they'd use JSON.  And XML has a bunch of
> overbearing baggage.  I only use XML when it's required by legacy
> interoperation, and I don't design anything new using XML.

Seconded.  You do not want to use XML unless you are forced to.  It's
not a good format for information interchange.

Here's a concrete example why:


You might wonder: why in the world does this do a Base64 encoding here?!

The reason is because certain Strings can't be represented in the Text
node of XML documents.  We ran across this problem in practice when
students started writing programs and copying and pasting content from
the web, which introduced characters like vertical tabs and other
characters that can't be represented in XML text nodes.

So we were forced to escape the content.   But as soon as you start
doing things, the use of XML looks more and more absurd.

Another reason why: http://en.wikipedia.org/wiki/Billion_laughs

The point is, XML is not a good data interchange format because the
defaults are not safe.

Posted on the users mailing list.