All about XML


What is XML?



I've published several posts on HTML. But this is my first post on XML that stands for eXensible Markup Language. Before starting the main discussion, I'd like to inform you that I've collected information about XML from w3schools. I was just surfing that site and suddenly my eyes go to the XML tutorials. Then I decided to write something on XML.


In fact, today's post is a knowledge base article. From this post, you will know about - what is XML. This post will not teach you how to prepare XML files. So, don't be confused.


Okay let's start - XML doesn't do anything! Confused? But there is no way to be confused actually when you will know that XML is nothing except some texts stored in tags.

  • XML - EXtensible Markup Language.

  • It's used to store and transport data.

  • Unlike HTML, XML is only used to store and transport data, not to display.

  • Unlike HTML, here you can define your own tags.

  • XML is simply a complement to HTML.


How Does XML Differ from HTML?

A Good question to reply. When you browse a site through internet, you just see structured texts, images, pages etc. You never see the codes behind those beautiful sites. But your browser has to interpret those pages using HTML. Any browser uses HTML to display websites.

HTML is used to display data. In contrast, XML is used to store and transport data. You can define your own tags in XML. But you can't do the same thing in HTML. Because HTML doesn't allow you to create something by yourself. It has some specific rules.
If you wanna learn about XML, you should have a basic knowledge in HTML and JavaScript.


A Little Example:

The following example may provide you a true understanding of an XML document. This is a piece of message. It has a sender, a receiver, a subject and a body. But the information is only wrapped in tags. You must use a media to send the information somewhere.

<Message>
<to>Adnan</to>
<from>Munna</from>
<Subject>Reminder</Subject>
<body>Never forget to inform me about AdSense Letter</body>
</Message>


The message above is absolutely self descriptive in that sense that some of the tags are invented by myself! The tags - <Message>, <Subject> are my own creation! In XML, you're allowed to create your own tags. Surprisingly, XML language has NO predefined tags!  XML allows author to define his/ her own tags and document structure.



Where you are, You with the XML!

XML became a W3C Recommendation on February 10, 1998. It is as important as HTML. XML is the most common tool for the transmission of data among all sorts of applications.  
  

Stay with Marks PC Solution to get more interesting IT topics!