<a>
<b>hi</b>
</a>
is not the same as <a><b>hi</b></a>
But Erik Naggum makes the argument against XML so much more fun <a>
<b>hi</b>
</a>
is not the same as <a><b>hi</b></a>
But Erik Naggum makes the argument against XML so much more funI, however, really enjoyed this line from the link. "I once believed that it would be very beneficial for our long-term information needs to adorn the text with as much meta-information as possible. I still believe that the world would be far better off if it had evolved standardized syntactic notations for time, location, proper names, language, etc, and that even prose text would be written in such a way that precision in these matters would not be sacrificed, but most people are so obsessively concerned with their immediate personal needs that anything that could be beneficial on a much larger scale have no chance of surviving."
This wonderfully, succinctly explains why efforts like the semantic web are doomed to failure.
an <strong>emphasized</strong> word
from an<strong>emphasized</strong>wordA lot of XML-hate comes from its overuse—it comes with overhead that is too expensive for simple cases, but is pretty useful when you go beyond simple. Right tool for the right job and all that...
Not entirely relevant to your point, but worth bringing up. (XML doesn't ever mangle binaries, because it simply forbids them.)
Saying there are no s-expression parsers for non-Lisp is ridiculous.
This one's http://sexpr.sourceforge.net/ for C, it's been in sourceforge since 2002.
perhaps you prefer one in :
Javascript - http://planet.plt-scheme.org/package-source/dherman/javascri...
Perl - http://search.cpan.org/~nelhage/Data-SExpression-0.34/lib/Da...
Limbo - http://man.cat-v.org/inferno/6/sexprs
I shan't go on
But you'll note the disparity in support. A library for parsing XML with C may have existed since 2002, but it's existed for XML since 97. In Java, XML support has been baked into the JVM for a while, but S-exp parsers are hard to find. That library you list for Javascript is not a s-exp parser but rather a Scheme library for generating Javascript from a Scheme-like language. Googling for javascript and s-exps returns a lot of results like that but not many s-expression parsers. There certainly aren't any widely used and recognized libraries like there are for XML and JSON fro most languages aside from Lisp.
If a node doesn't mean anything to your application, ignore it. If you're an XHTML parser, the whitespace is significant, so you need to handle it. If you're a FooML parser, the whitespace is insignificant, so just ignore it.
If you hate XML, this is not a particularly good justification.
JSON:
{"a":{"b":"hi"}}
YAML:
---
a:
b: hi <pre><b>Hello!</b></pre>
is rendered differently from <pre>
<b>Hello!</b>
</pre>