Blog

Why XML instead of HTML?

Posted by Nipun Tomar Blogs | XML 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>.
post comment
     
COMMENT USING
PREMIUM SPONSORS
Over-C is a holistic consortium of communications and technology specialists. We build, deploy and market both business as well as consumer products and solutions.
SPONSORED BY
  • PDF reports have never been easier to create. With our included WYSIWYG Designer, you can layout your reports, set up your data source and let DynamicPDF ReportWriter do the rest.
Get Career Advice from Experts