Now that many people seem to be moving towards JSON for web communication I am wondering about why XML should continue to be used.
I appreciate that XML has many years on JSON, during which time it has been widely adopted. However, the fact that it is so well-adopted appears to be the one decisive reason why it should continue to be used.
Is there a good reason why XML should not gradually be phased out in favour of JSON?
Note that JSON (JavaScript Object Notation) is a lightweight data-interchange format, while XML (Extensible Markup Language) is a set of rules for encoding documents electronically.
XML, thus, is not a format but a “protocol” to encode different formats: XSLT, RSS, SOAP, RDF/XML and XHTML, just to name a few. JSON has lately become more popular as exchange format mainly in web-services, yet XML’s scope is much wider than that. I’d further say that XML’s role is key in the development of the semantic web.