Lots of comments here about XML vs. JSON... but there are areas where these two don't collide. I'm thinking about text/document encoding (real annotated text, things like books, etc).<p>Even though XML is still king here (see TEI and other norms), some of its limitations are a problem. Consider the following text:<p><pre><code> Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
</code></pre>
Now say you want to qualify a part of it:<p><pre><code> Lorem ipsum <sometag>dolor sit amet</sometag>, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
</code></pre>
Now say you want to qualify another part, but it's overlapping with previous part:<p><pre><code> Lorem ipsum <sometag>dolor sit <someothertag>amet</sometag>, consectetur</someothertag> adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
</code></pre>
Of course, this is illegal XML... so we have to do dirty hacks like this:<p><pre><code> Lorem ipsum <start someid="part1"/>dolor sit <start someid="part2"/>amet<end someid="part1"/>, consectetur<end someid="part2"> adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
</code></pre>
Which means rather inefficient queries afterwards :-/