Navigation


Difference between HTML and XML

3:06 AM, Posted by Mini, No Comment

HTML vs. XMLHTML
HTML stands for Hypertext Markup Language. HTML standardizes the description of document layout and display, and is an integral part of every website today. In other words, HTML is a language for describing how pages of text, graphics and other information are organized, formatted and linked together.

Today, HTML pages are the standard interface to the internet. They can include animated graphics, sound and video, complete interactive programs, and good old-fashioned text. Millions of web pages are retrieved each day from thousands of web server computers around the world.


XML

XML stands for Extensible Markup Language. It is used to describe documents and data in a standardized, text-based format, easily transportable via standard internet protocols. XML, is based on the mother of all markup languages-Standard Generalized Markup Language(SGML). XML can be used to provide more details on the structure and meaning of the data pages rather than just specifying the format of the web pages. The formatting aspects can be specified separately, by using a formatting language such XSL(extended style sheet language). XML can describe data as records of data store or as a single document.

HTML vs. XML
As a language, XML defines both syntax and grammar rules. The rules are called Document Type Definition(DTD), and are one of the major differences between HTML and XML. XML uses metadata for describing data. The metadata of XML is not complex and adds to the readability of the document. XML, like HTML, also uses tags to describe data however, tags, unlike HTML, describes data and not how to present it. To display XML data,. You often transform it using XSLT into an HTML page.

HTML is comprised of a defined set of tags, XML on the other hand has very few defined gas. However, it does not mean that XML is powerless, the greatest power of XML is that it is extensible. You can create your own tags with your own semantic meaning. For example, you can create to use for your customer information data such as: Customer_First_Name like Manoj

This tag has meaning for you and, thus, to your application. This tag has been created by you to designate customer’s first name but its tells nothing about its presentation. But how is this gag useful to us? Consider now that data stream contains multiple customers information. If you want to find all customers with first name “Manoj” you can easily search for the "customer_first_name" tags. You can not perform such type of operation in HTML with the same ease and consistency, as HTML was bit designed for such purposes. XML is case sensitive while HTML is not.

No Comment