Extensible Markup Language, abbreviated as XML, is a markup language used to define documents with a standard format that is human-readable as well as machine-readable through the use of tags. It is a hardware and software-independent tool for storing and transporting data.
In simple words, it is a simpler subset of the SGML, a standard to craft a document structure. It uses a Document Type Definition (DTD) to describe the data formally. XML data is self-defining, suggesting that the structure of the data is embedded with the data, hence there is no need to pre build the structure to store the data.
It is easy to learn.
It allows data to be used by any kind of application.
It is entirely compatible with Java and 100 percent portable.
It is extensible, meaning you can create your own tags.
It is platform independent.
It can represent commonly used data structures such as lists, records.
It permits validation using schema languages like Schematron and XSD which makes unit-testing efficient.
It is comparatively easy to maintain forward and backward compatibility despite alterations in DTD or Schema.