I'm sure lots of developers are familiar with XML and JSON, and they've used both of them. Thus no point in explaining what they are, and what is their purpose, even in brief.

If we try to map their concepts, we can say (correct me if I'm wrong):


XML tags are equivalent to JSON {}
XML attributes are equivalent to JSON properties
XML tag collection is equivalent to JSON []


The only thing I can think of, which doesn't exist in JSON, is XML Namespaces. 

The question is, considering this mapping, and considering that JSON is highly lighter in this mapping, can we see a world in future (or at least theoretically think of a world) without XML, but with JSON doing everything XML does? Can we use JSON everywhere XML is used?

PS: Please note that I've seen this question. It's something entirely different from what I'm asking here. Thus please don't mention duplicate.

The thing that gives XML its power and a lot of its complexity is mixed content. Stuff like this:

<p>A <b>fine</b> mess we're in!</p>


Don't even try to do that in JSON, or manipulate it in conventional programming languages. They weren't designed for the job.

This kind of question usually comes from people who forget that that the M in XML stands for markup. It's a way of taking plain text and adding markup to create structured text. It's quite handy for old-fashioned data too, but that's not what it was designed for or where its main strengths lie. There are plenty of ways of handling simple data, and JSON is one of them.
