Home Tutorial Xml Comparing XML with HTML

 
 

Share on Google+Share on Google+
Comparing XML with HTML
Posted on: November 10, 2010 at 12:00 AM
Advertisement
Comparing XML with HTML

Comparing XML with HTML

XML and HTML are both designed for different purposes. Although they have some similarities in markup syntax but they are created for different types of goals. XML is not at all the replacement of HTML but is complement to html.

Here is the list of comparison between XML and HTML given below:

  1. XML is designed to carry the data while html is to display the data and focus on how the data looks.

  2. XML does not do anything but it is used to structure the data, store the data and transport the data while HTML is used to display the data only.

  3. XML is cross platform, hardware and software independent tool to carry data from one source to another destination.

  4. XML is self descriptive. The DTD or schema describes what and how to use tags and elements in an xml document.

  5. XML does not have predefined tags while HTML has. XML lets you invent your own tags while html gives you predefined tags and you have to use them only.

  6. XML is extensible as you can add your own tags to extend the xml data.

  7. XML is a complement to HTML not the replacement. Most likely use of xml is to transfer the data between incompatible systems as xml is cross platform. XML has now established a strong foundation in the world of web development.

  8. XML can separate the data from html.  While working on html, instead of storing data in html you can store the data in a separate xml file to make the html code cleaner and easier. Now you can concentrate on working in html rather than storing data. It also eliminates the need to change in html when xml data is changed.

  9. XML tags are case sensitive while html tags are not.

  10. Attribute values must always be quoted in xml while its not the case with html.

  11. XML elements must be properly nested while html is not so sensitive.

Advertisement

Related Tags for Comparing XML with HTML:


Follow us on Twitter, or add us on Facebook or Google Plus to keep you updated with the recent trends of Java and other open source platforms.

Posted on: November 10, 2010

Recommend the tutorial

Advertisements Advertisements
 

 

 

DMCA.com