Growing Rich Everyday... My Weblog

Enrich yourself by finding and enjoying the simple and finer things in the daily humdrum of life...




HyperTextMarkupLanguage - if you go to a zillion websites, all have the more or less similar definition - It is a language used for marking up documents. But what is marking up?

Get any clue?

Imagine you were writing up a document in Microsoft Word to be printed later. To emphasize the headers, you would select one of the Header options in menubar. To emphasize on particular words or definitions in the document, you would either make them bold or italicize them. To change the paragraphs, you might indent your new paragraphs by a few tab spaces and adjust the scale.
Obviously you have visual cues on the menubar to help you achieve all such functions. As you print the document, the headers, the paragraphs, the italicized words are rendered on the paper as you expected them to be.

Now comes the browser ... the browser cannot understand what's a header or what's a new paragraph in the document by itself. It cannot distinguish between an italicized word versus a bold word. It needs explicit information to be able to do so. Without that information, all the different parts of the document mean the same to the browser. Thus, we have to explicitly tell the browser what's what. And how do we do that? We "mark up" the document effectively telling the browser - here's a header, here's a new paragraph and so on...And this is what HTML does.

eXtensibleMarkupLanguage (XML) - Now this language also does markup.
But while HTML specifically marks up the different parts of the document with a view to rendering its structure exactly as needed, XML marks up a document semantically.

Now the semantics of one document can be totally different than that of the other - one document may talk about physics while the other may talk about history. But the formatting of both the documents will never change ! This is why we have a standard set of elements in the HTML language, but XML can never have a standard set of elements - hence the eXtensibility.
XML's primary purpose is to facilitate the sharing of structured data (data that is systematically marked up) across different information systems.

0 comments

Post a Comment

Subscribe to: Post Comments (Atom)