Difference between XML and HTML

Thursday, July 30, 2009

Definition of XML

XML is a text based markup language that is fast becoming a standard for data exchange on the web.As with web you identify data using tags, collectively the tags are known as “Markup”.
Difference between XML & HTML

• Unlike HTML, XML tags tell you what the data means, rather than how to display it. XML tag acts like a field name in your program. It puts a label on piece of data that identify it.

• XML document is always well formed.

• In HTML, there is a fixed set of tags that we can use to tell the application (web browser) how to display data (formatting of data).While in XML, you are free to use any tags that make sense for a given application. We can define tags in the same way as we define field names for a data structure.

• With HTML, whitespace is essentially irrelevant, because it gives the representation of data not contents or meaning of data.

• In XML, you could easily search a data set for messages containing “cool” in the subject, because the xml tag identifies the content of data rather than specifying its representation.

0 comments:

Post a Comment

 
 
 
Your Ad Here