XML is otherwise known as extensible mark- up language, which is a mark- up language(a defined system of document annotation which is explicitly distinguishable from the actual text) that performs encoding of documents by establishing a defined set of rules in a format that can be read and perceived by both humans and machines.
XML files have a wide range of applications to their purpose including data storage. XML had been the preferred format for the representation, storage, and transportation of structured data before the rival JSON gained its great popularity.
XML as its name itself essences is extensible and as such allows the user to define their tags along with the specific order he wants them to occur and the design in which they are to be processed or displayed in code. A different way however to view the essence of extensibility, is to look at it as XML gives us the chance to extend our scope of what a document is. It can be a file that spends its days locked away in a file server or it may as well be- as is the case for web servers- a piece of data (transient) that travels from one computer to another.
XML code is a language that is very similar to HTML language, but it differs in that it offers a lot more flexibility as compared to HTML as it allows a user to design his custom tags where desired. It is a necessary fact to note however that XML is not a language, unlike its counterpart HTML, it is instead a metalanguage which is a language that allows one to design and create new languages. Examples of languages that have been created using XML code are RSS, MathML (a mark- up language based mathematically) and as well tools such as XSLT.
A significant difference between XML and its close relative HTML is that the latter is designed for the display and creation of content that is strictly used on web browsers and not a lot else. It becomes cumbersome if the task gets a little more complicated such as translating a web page from the German language to English or even something as simple as displaying content on a mobile device. Its one defining purpose is to facilitate the quick creation of web documents by anyone that can be shared among many people.
Its counterpart XML on the other hand, is not just intended for web related purposes but can be used in a variety of different areas of application some of which may not have an occurrence where humans come to contact with the produced content an example of this are the web services which use XML in the back and forth transfer of requests and responses.
Only in rare occasions does HTML ever provide information about how the meaning and structure of a document. In simpler terms, HTML is just but a language of presentation while XML is a language concerned with the description of data.