xml Tutorial

XML is a markup language used to store hierarchical data in text files. It is also known as semi-structured data, like JSON. XML is machine-readable, yet can also be read and produced by people.

XML is made up of elements, sometimes casually referred to as a tag soup, which can themselves contain other elements and/or text. Elements may also contain attributes.

XML is often used for data exchange between platforms, especially over the internet. It is also increasingly used for storing semi-structured data in NoSQL data stores (XML databases/document stores). Furthermore, it has the flexibility to handle document-oriented data (text with markup), which makes it very popular in the publishing industry. XML is also widely used for configuration files.

One of the main reasons why XML is so widely used is that it is standardized, with many parsers available, including open source. This makes the cost of using XML lower than the invention of one’s own new syntax.

More information about XML’s origin and goals can be found in the official W3C Recommendation.

There are two versions of XML, shown in the table below. The editions of each version are just revisions of the original documents and not changes of the standards.

The first version of XML is 1.0. XML 1.1 was primary changed due to the Unicode version change from 2.0 to 3.1 and specifies a set of new rules for the use and interpretation of new Unicode characters.