Xml&json war, generally can separate two opposing camps. The party's feel JSON is strong enough to be able to replace XML. There is a sense that JSON is funny and ugly, absolutely not and XML tournament possible.
In order to avoid "pull the hatred" (I am not MT). The author is not correct json&xml who is the more advantageous position, just analysis xml&json typical application scenario.
1. In case of human-machine interaction, we recommend using XML to provide the configuration for "machine".
"Person" here means a lack of programming experience operator or careless coder, "machine" refers to software system.
Why choose XML instead of JSON? The main reason is the XML beauty bar. There are historical reasons for the beauty of XML. In Java, for example, the classic action inside Tomcat's web.xml,struct is not configured with XML, and programming is preconceived. He appeared first, which is the standard. It's beautiful. JSON is really a bit ugly. Countless curly braces make you crack!
The second reason is that the XML constraint is more sophisticated, the advantage of the specification is to greatly reduce the cost of configuring the "Make an XML constraint", you just need to learn the DTD or schema can easily "make an XML constraint." But for most individuals or companies. Making a JSON constraint is much more expensive than writing some DTD or schema.
2, in Java. Use XML as much as possible.
Java and XML have a sense of collusion. There are too many XML-related tools such as XML parsers in Java. Really, it's too much.
3, XML can implement some simple stand-alone database.
4, network transmission, try to use JSON. Why? Thanks to the JSON lighter, the simple form. The volume is thin and light meaning to help you save a lot of other traffic, in simple means, more forms easy cross platform, expand.
5. node, to use a script or Web page JSON. This, explain to do ...
6. JSON it can be conveniently stored in multiple Key-value databases.
XML and JSON selection awards