All these “semi-structured” formats, primarily SGML and its descenders XML and HTML, were initially intended for native language text markup. The mere fact people come up with other markup languages, such as ReST, BBcode, various wiki languages, Gemtext etc., clearly demonstrates one thing: HTML is a failure. These “angle-bracketed tags” are too bad even for the purpose they were intended: for native-language document formatting.
As of using XML for machine-readable data (which is not a native-language text), it is simply a nonsense, and for healthy-minded people it was clear from the very start. But healthy-minded people are a dying-out species nowadays, as clearly shown by the mere fact such an ugly beast as JSON appeared long after it became clear nothing like this has any right nor even a reason to exist.
So here's the rule: machine-readable data formats with recursive nesting are forbidden (this doesn't apply to markups for native language documents; but see the discussion below).
Primarily this applies to text-based formats, namely SGML-based languages (XML and HTML) and JSON, but in case you encounter binary format defined to have recursive nesting, please remember it is in no way better.
NB: if you think you really need recursive nesting, it means you just don't realize something important. Look, there's theory of databases. It is a well-known fact that relational model is able to solve any database-related task. And the First Normal Form (1NF) — the simplest one among the nine known normal forms — is, simply speaking, just a requirement for all values (elements in any column of any row) to be atomic.
Someone might argue that “modern” database engines allow non-atomic data and even JSON; the answer here is that the modern IT industry is driven by irresponsible idiots who don't bother learning any theory, and, furthermore, never bother to think what they do.
Okay, there's one obvious exception from the rule, which we are forced to make. Recursively nesting data formats are allowed for interoperability with external software, provided that they are not used internally. So, our program can both analyse and compose data in such formats, but must never store its own data in these formats. Some templates and snippets used to compose such data should be stored as they are, but this is no violation of the rule: all these snippets and templates are just strings from which a larger text is composed.
As stated above, native language documents may need recursively-nesting
markups, but texts in native languages are not considered machine-readable
data. We strongly dislike HTML, and we discourage its use even as a native
language markup; better markups exist already, and perhaps something better
than those angle-bracketed tags with weird grammar should be invented one
day. However, we have to allow HTML to some extent, as without it, we
wouldn't be able to create any web sites, and, unfortunately, sometimes we
have to do so. However, HTML5 (in contrast to other versions of [X]HTML)
is strictly prohibited for any use;
XHTML 1.0 Transitional is recommended (why Transitional? because
we need the iframe tag). CSS must be limited to level 1,
with some selected features of CSS2, but none of the CSS3 features are
allowed. In case we really have to obey the HTML5 specification,
we must limit the set of tags being used so that the whole document (except
may be the heading that specifies the markup version) remains correct as
either XHTML, or HTML4.
It perhaps deserves to be said explicitly that [X]HTML may only be used for web sites, literally. In particular, composing and sending email and other messages containing HTML is strictly prohibited.
The last thing to mention specially for devil's advocates: most of programming languages allow unlimited recursive nesting. Well, not for everything, e.g., you can't place one program inside another, and for statically-compiled languages, you shouldn't try to place one function or procedure inside another one, even if it is supported by the compiler. Anyway, at least arithmetic equations and control statements allow for (formally unlimited) nesting.
Well, programs are not data, they are programs. Bye.
By the way, MIME is recursively nesting, as you can put one MIME container into another. We have to analyse MIME-formatted stream in exactly one situation: for file-uploading webforms. We never generate anything like MIME containers, messages etc; in particular, if we send emails, they are in plain text. Actually, this is not the only (and even not the main) reason to ban everything related to MIME.