Did you know what an XML file is? XML stands for Extensible Markup Language and it is used to annotate text or for adding additional information. Although, these annotations are not shown to the end-user, but these are required by the ‘machine’ in order to read and to make subsequent text process easy.
The well known example is HTML (HyperText Markup Language). You may see that websites are coded in HTML or any other programming languages, however, you will never able to see a trace of code. So do you know what an XML does?
Like HTML, XML is more recent language but it offers more flexibility. Like HTML, it is a much simplified subset of Standard Generalized Markup Language (SGML), the leader of all markup languages. XML is a universal format points towards the structured documents and data on the web. However, the real problem with HTML is that it encompasses of a static set of commands and therefore, whenever you want to give certain attributions, you would required to type these commands. Let us understand it with an example. Say you are keen to change the size or colour of a header. That can indeed by a tiring and annoying process. In order to combat this tiresome edition, style sheets were introduced. It means, now you simply need to call your header a ‘header 1′ in your website and in the style sheet you need to define what a ‘header 1′ is like. It means, whenever you want to change your header, you can change it in only one place, i.e, the style sheet.
Also, XML works on the similar pattern as of a style sheet. It is more flexible than HTML as it allows you to create your own building blocks. Basically, an XML document is a type of style sheet that clearly defines how its subordinate documents should be read by the ‘machine’.
There is a difference between HTML and XML. As HTML defines how data will look, while XML defines what mainly data is. It means, XML does not replace HTML and infact it extends it. It means, XML only structure, store, and transport data.
It means, XML is used to outsource data. There are many languages which are based on XML, including XHTML, WAP for hand held devices, or RSS for feeds.