For me usable means that:
- it’s being used in real-wold
- it has tools support. (at least some simple editor)
- it has human readable syntax (no angle brackets please)
Also I want it to be as close to XML as possible, i.e. there must be support for attributes as well as for properties. So, no YAML please. Currently, only one matching language comes to my mind – JSON. Do you know any other alternatives?
YAML is a 100% superset of JSON, so it doesn’t make sense to reject YAML and then consider JSON instead. YAML does everything JSON does, but YAML gives so much more too (like references).
I can’t think of anything XML can do that YAML can’t, except to validate a document with a DTD, which in my experience has never been worth the overhead. But YAML is so much faster and easier to type and read than XML.
As for attributes or properties, if you think about it, they don’t truly “add” anything… it’s just a notational shortcut to write something as an attribute of the node instead of putting it in its own child node. But if you like that convenience, you can often emulate it with YAML’s inline lists/hashes. Eg:
For me, the luxury of not having to write each node tag twice, combined with the freedom from all the angle-bracket litter makes YAML a preferred choice. I also actually like the lack of formal tag attributes, as that always seemed to me like a gray area of XML that needlessly introduced two sets of syntax (both when writing and traversing) for essentially the same concept. YAML does away with that confusion altogether.