Is XML dead?

Time:2019-1-22

Over the past decade, the voice of singing down XML has never stopped. As a popular extensible markup language, it seems that it is really getting worse. Recently, in the process of cross-departmental cooperation, we have been fortunate to have access to large-scale projects using XML as a general configuration. However, in the process of development, we gradually feel that this xml-oriented programming method makes simple problems more complex. At the same time, this highly configurable way of customization is particularly clear and efficient for project management. So I got caught up in thinking about how to treat XML correctly. .

1. History of XML

First, we briefly review several important development nodes of XML:

  • In 1978, after standardizing GML (General Markup Language) developed by IBM in the 1960s, ANSI released it as SGML (The Standard Generalized Markup Language), which became the predecessor of XML.
  • In 1986, SGML, as a General Markup language, was adopted by ISO. However, the definition of SGML is too complex to be popularized.
  • In 1995, considering the shortcomings of HTML at that time, a prototype of simplified and optimized XML was formed and proposed to W3C.
  • In February 1998, XML 1.0 was released and formally became the standard of W3C.

Although XML was born to solve some of the drawbacks of HTML and replace it. Unfortunately, it is well known that XML has not replaced HTML as a new hypertext markup language.
However, this does not hinder the continuous evolution of XML and is widely used as a cross-platform data exchange format: mainly for the content of data, through different formatting descriptions (XSLT, CSS, etc.) can complete the final formal expression (generate corresponding HTML, PDF or other file formats).

notesHTML is also based on SGML. To be exact, HTML is an application of SGML (hypertext version based on SGML).

Yes, JSON is an excellent data exchange format, but it’s just a data exchange format (compared with XML).

2、XML VS JSON

In the age of WEB technology, JSON seems to have become a de facto standard for WEB data exchange format.

If strictly defined, XML and JSON are not the same thing. XML is a markup metalanguage, while JSON is a lightweight data exchange format. From this point of view, XML and JSON are not comparable. Many times we are talking about XML VS JSON. In fact, we are talking about the comparison between XML as a data exchange format and JSON as a data exchange format.

Although JSON was born as a subset of JavsScript, it is independent of language. JSON is more suitable for the field of network data transmission because of its small size, simplicity and the built-in fast parsing support of browsers. In the era of web 2.0, JSON has made great progress.

Here are the data on Google Trends and Stack Overflow Insights:

Google Trends:
Is XML dead?

StackOverflow Insights:
Is XML dead?

As you can see, JSON is getting hotter than XML around 2013.

Although JSON is far inferior to XML in terms of semantic expression, data storage and retrieval, its simplicity and lightweight make it popular in the market.

notesThe inspiration from this point is that simplicity is easier to use than comprehensiveness is easier to popularize. For example, the controversy between OSI Layer 7 network protocol and TCP/IP Layer 4 protocol at that time has the same principle: Simplicity is the premise of popularity.

3. Is XML really dead?

Looking at this trend, one wonders: Is XML really dead?
The answer, of course, is No.
This is actually a kind of cognitive bias. Seeing less does not mean that there is not much in fact. For example, segmentfaults are mostly front-end technology articles. Does this mean that back-end technology has disappeared? Obviously not.

Curves can only illustrate a future trend in a scenario, such as XML in the web arena, which is not as widely used as json. However, in enterprise software applications oriented to SOA architecture, XML is still the de facto standard for information exchange. As a meta-markup language that can customize tags, XML is especially suitable for describing complex business logic.
Moreover, in today’s publishing industry, XML is used throughout the document processing workflow. It is also a standard office file format, such as Word, Excel, PowerPoint or Google Docs.

Therefore, XML is not dead, but applications in some areas are decreasing, but there are still many applications in other areas, especially at the enterprise level.

References

https://www.quora.com/Is-XML-…
https://zh.wikipedia.org/zh-h…
https://www.itcodemonkey.com/…
http://www.cftea.com/c/444.asp
http://siddim.com/archives/47…
https://zh.wikipedia.org/zh-h…