Thursday, December 11, 2008

What is XML?

Some of you will know what XML is. Some of you may even use it. For those of you who don't, this blog entry will be of interest to you.

Well, let's start by discussing what XML is.

XML stands for EXtensible Markup Language. It is called extensible because the language is extendable. See, while it can be compared to HTML (since the data is also marked up with tags) it really is quite different because:

a) The tags are not predefined (to put this simplistically, you create your own tags, hence extendable - one can add more tags as needed);
b) The rules are very strict (it would have to be because of point a above);
c) XML was not designed to display data, but rather to structure data;
d) HTML is restricted to be viewed in browsers (or similar software), whereas XML can be (and is) much more widely used.

XML is most often used to store data or transfer data. Either usage requires that the data is defined. E.g. this part of the data is the product name and this part is the price. This makes it possible for humans and computer programs to interpret the data.

So, what's the big deal? Well to start with, HTML is too restrictive (only has a limited set of tags) to be used to structure data. It does a great job in presenting data along with style sheets. But that is where its usefulness ends. XML won't replace it for this task, but it will work with HTML and, interestingly enough, it defines the latest version of HTML, called XHMTL.

What does this all mean? XML's job is to provide a way to store data in a structured and meaningful way that is not ambiguous. The design of XML is so clever that it can structure almost any data, including but not limited to electronic transfer data, mathematics, music, documents (of almost any kind), etc.

However, by itself, XML can't do these things. It is actually through the use of software written to use XML that its usefulness really comes out. And then it shines light years above anything else devised so far.

Therefore, to use XML one has to have at one's disposal programs (software) that are XML enabled. To the web developer it means that to benefit from XML you will need to know how to write programs (e.g. ASP.NET, JavaScript, etc.).

What software uses XML? Actually, quite a bit. Some word processing software already stores the documents in XML format. Many banking systems have already deployed XML to transfer financial information. From a web developer's point of view, you can use XML from inside many browsers using JavaScript. ASP can be used to create or read XML data. Technologies such as Java (JDEE) and ASP.NET have been developed to natively use XML as one of its array of data sources.

The question that may come to your lips is: Could you use XML inside your web pages? Yes, you can. Amongst the simplest functions can include using JavaScript inside the browser to display selected bits of info, make sortable columns, etc.

But, whatever way you want to use XML, you do need to get to learn it. There is really quite a lot to it and you should add that to your list of things to learn.

If you are interested in learning more about XML you may attend our XML course.

Find out more about web related training in South Africa visit http://www.workingwebs.co.za/.

No comments: