But there's a point I'd like to be clarified, if possible: it's not the first time I read that XML is bad in some abstract way, so I'd really be interested in knowing how was XML's rep "destroyed"?
E.g. you have <user name="john" address="123 Oracle Road"></user>
Now you decide you need multiple addresses per user. Do you: a) invent an ad-hoc string serialization scheme for the address="" property, or b) completely restructure your XML into:
<user name="john"> <address>123 Oracle Road</address> <address>456 XML Lane</address> </user>
But in that case, why not just make every property a child?
XML also spawned idiotic things like XSLT, which most agree is pretty terrible. If you try to use XSLT for HTML templating, by definition you have to escape every meaningful HTML character like "<>&'". If you wish to print one of those characters in your templates, you have to double escape them. No designer I know of would touch it with a ten foot pole, and every programmer I've met who loved XML and its associated technologies was terrible at their job.
Basically XML is strongly associated with the bloaty enterprise Java world, who used XML as their hammer to beat down anything remotely nail-like.
<look attr="at" attr2="up"> this <awkward> problem </awkward></look>
(look (|attr at) (|attr2 up) this (awkward problem))
just by saving "|" as a meta to annotate an attribute pair.
And the weird problem of lone tags looking like unclosed ones magically flies away (I think) since
<script type="text/javascript" src="foo.js" {">", "/>", "></script>"}
is just
(script (|type text/javascript) (|src foo.js))
...sometimes I wonder why isn't everything ever made out of S-exprs.
(look #:attr "at" #:attr2 "up" this (awkward problem))
Or to handle XML on the fly, cons cells are another option: (look '(attr . "at") '(attr2 . "up) this (awkward problem))
Going further since it's Lisp and we're just parsing, we could pretty much use whatever syntax we want by adding a macro: (look (attributes attr "at" attr2 "up") this (awkward problem))Thank you.