Skip to main content

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!


Comments

  1. Good to see my name here!

    But the title says, all about XML. Well, to be honest, the post does not explain all the things about xml. It just defines it. XML has many rules. In fact, it is strictly structured. Even a single disposition of a character can break the whole XML code. There are 2 important rules for XML which you should mention.

    1. Every tag that starts must have an ending tag. (<tag></tag>) But if it doesn't contain anything inside it, it can go like this: <tag /> (without the ending tag.)

    2. Every attribute must have values enclosed with double quotes. Early HTML standards did not specify this. But XHTML (or HTML with XML standards) takes this rule seriously.
    So, <input type="checkbox" checked > is invalid.
    But, <input type="checkbox" checked="checked" /> is valid.

    These 2 rules are the gist of XHTML.

    You are right that XML does not do anything by itself. It is just data. The reason behind inventing this complex data structure is that it is ideal for storing hierarchical data. For example,

    <family>

    <parents>
    <parent name="Shameem" role="Father" />
    <parent name="Khaleda" role="Mother" />
    </parents>

    <children>
    <child name="Khalid" role="Son" />
    <child name="Tarik" role="Son" />
    <child name="Tanvir" role="Son" />
    <child name="Adnan" role="Son" />
    </children>
    </family>

    Here you can see that the family structure has been presented in a hierarchical manner. The tags are there. So if you want to add another parent, for example, a grand parent, it is easier. And from the single code you can understand the hierarchical relation among the data. Examples would make it clearer my friend.

    ReplyDelete

Post a Comment

Popular posts from this blog

GTA San Andreas Cheat Code (PDF)

After Vice City, San Andreas is the most popular game released by Grand Theft Auto (GTA). Usually GTA releases role playing game. San Andreas is such a game where you can act like a person. You can do everything. You have to take part in missions and complete them.  To make your missions easier, there are lots of cheat codes. If you can properly apply these codes, the tough parts of the game will be easier. Cheat codes are somewhat like keyboard shortcuts of computer programs.  I've shared 63 cheat codes below. There were more cheat codes in my collection, but I've omitted the less important cheats. Effects or result of the cheats are on the left side, and the codes are on the right side.  You can copy the following codes in your PC. And for your convenience, I've also uploaded a PDF file of these codes. You will find the download link at the bottom.  Effect Cheat Code Adrenaline Mode MUNASEF All Cars Explode ALLCARSGOB

Rules for Bengali Typing in PDF (Bijoy Layout)

Bijoy is the most popular layout for Bangla typing. The layout was developed by Mostafa Jabbar. He is the pioneer of Bangla typing in computer. More than 90% people use his Bijoy layout for Bangla typing. Today, I'm gonna share a PDF file with you that contains the Bijoy Keyboard layout with English fonts! If your keyboard doesn't have bengali fonts then you can print this PDF file to know where the bengali fonts are located in your keyboard. Additionally this file contains all the necessary rules and tips which are essential for Bangla Typing.  Now there are many other software available for Bangla Typing Layout. Such as Avro Easy, Unicode, Unibijoy etc. And there rules are also somewhat different from Bijoy. And some of their layouts follow the same rules like Bijoy. Hopefully this PDF file will support most of the rules when a layout is similar to Bijoy Layout.  Click to enlarge the image Download the PDF file from the button below. Follow

Download Puzzle Flash Game - Save Them

Hey Flash Game Lovers! Today you're getting an amazing puzzle game - Save Them! It's a flash game and the download size is only 382 KB. In this game, you have to move 3 missionaries and 3 cannibals from one side to another through a boat. In any side, if the number of cannibals is more than the number of missionaries, then cannibals will eat the missionaries!  Download Save Them Download the game from the above link. It's a zipped file. Download size is only 382 KB! After downloading the game, you have to unzip it first. Then double click on the SaveThem to start the game.  How to Play? After starting the game, you will get the instruction. You have to make sure that in no side, the number of cannibals is not more than the number of missionaries. This is your only challenge. You have to take them from left side to the right side of the lake through a boat.  Press on a character to jump to the boat. Thus you can take any two of them a