XML Alternatives (2002)
web.archive.org
web.archive.org
This means that XML subsets are actually pretty decent. Basically the subset of:
- `<!-- ... -->` comments
- `<foo>...</foo>` and `<foo/>` tags
- `>` and similar entities (basically, just the XML-builtin ones, no custom declarations)
- optionally: `<?xml ... ?>` tag at the start (just for compatibility)
- optionally: `<![CDATA[...]]>` (where required for the application)
- optionally: `<foo:bar/>` namespaces (but without needing to declare them like in XML; essentially, just adding ':' as a permitted character)
If I were to extend it, I'd probably also add HTML-like value-less parameters, like `<input readonly/>`. I'd also add an API to create custom entities (but no support within the file itself), to make it more adaptable to specific use-cases.
And this is it. The big issue with XML is all the complexities of DTDs and being able to declare new entities, etc. It was also woefully overused at some point, in not-really-XML ways --- such as by XMPP (which would work much better as a binary protocol).
---
I agree on YAML, by the way. It tries to do too much, and ends up being very unintuitive (here's one for you: what are the various ways of having a multiline string?). It doesn't help that two different parsers won't generally agree on all the details of the format.
I think TOML (Tom's Obvious, Minimal Language) is a good compromise, if you're looking for something in a similar JSONy-but-human-writable vein.
It does say updated 2006 which explains how it can include GroovyMarukup.
It's at the cost of human-readability, but it's still readable enough for debugging. Editor plugins could probably fix this issue entirely, by presenting the contents as a more "normal" Lispy syntax.
---
I think the Redis protocol is also a pretty good binary-safe-but-otherwise-text interchange format: https://redis.io/topics/protocol
One thing I'd do there, though, is to change CRLF at the end of a line to LF. Well, that and of course also drop support for the legacy protocol, unless one has a good reason to keep it for debugging.