Why XML instead of HTML?

By Nipun Tomar Apr 26, 2011
HTML is a markup language used for displaying information, while XML markup is used for describing data of virtually any type.

HTML is a markup language used for displaying information, while XML markup is used for describing data of virtually any type. In other words, we can say that HTML deals with how to present whereas XML deals with what to present.
Lets take an example In HTML a student might be described using a definition name, definition data, an unordered list, and list items. But none of these elements actually have anything to do with student.

The HTML is as under:
<HTML>
<body>
<dt>Mayank</dt>
<dd> Of Science Stream</dd>
<ul>
<li>Standard: Eleventh
<li>School: ABC Pvt. School
</ul>
<body>
</html>
And the XML for this is:
<XML>
<STUDENT>
<NAME>Mayank</NAME>
<STREAM>Science</STREAM>
<STANDARD>Eleventh</STANDARD>
<SCHOOL>ABC Pvt. School</SCHOOL>
</STUDENT>
</XML>
Instead of generic tags like <dt> and <li>, this listing uses meaningful tags like
<STUDENT>, <NAME>, <STREAM>, and <STANDARD>.
Nipun Tomar

Nipun is competent and experienced project leader, with 9 years of experience in managing multi-disciplinary teams of varying sizes and complex programs of work. Has the ability to build strong relationships wit... Read more

COMMENT USING

PREMIUM SPONSORS

Hire Mobile & Web Developer on demand. 100% satisfaction. Try for 1 week or Money Back. Local and remote developers available all over USA.

Latest Blogs