XML vs HTML
XML stands for EXtensible Markup Language. It is defined in the XML 1.0 specification, which is developed by the W3C (World Wide Web Consortium). XML provides a standard way, which is also simple, to encode data and text such that the content could be exchanged across driver hardware, operating systems and applications with little human intervention. HyperText Markup Language, widely known as HTML is also a leading markup language for web pages. HTML is the basic building block of web pages. Web browser reads the HTML document and composes them into visual or audible web pages.
XML is a markup language that is used to transfer data and text between driver hardware, operating systems and applications with little human intervention. XML provides tags, attributes and element structures that can be used to provide context information. This context information can be used to decode the meaning of the content. This makes it possible to develop efficient search engines and perform data mining on the data. Furthermore, traditional relational databases are suitable as XML data because they could be organized in rows and columns but XML provides less support for data with rich content such as audio, video, complex documents, etc. XML databases store data in a structured, hierarchical form which allows queries to be processed more efficiently. XML tags are not predefined and the users can define new tags and document structures. Also, new internet languages such as RSS, Atom, SOAP, and XHTM were created using XML.
Difference between XML and HTML
Even though, XML and HTML are both markup languages, there are some fundamental differences between them. HTML mainly consists of tags that define the appearance of the content, while XML tags generally define the structure and the content of data (and the actual appearance is defined by an associated style sheet). Secondly, XML is extensible, since the XML tags can be defined by the user for a specific application, while HTML tags are defined by W3C.