Free Webmaster Help Logo
Tutorials Articles Tools Images Directory Ask Newsletter

Advanced HTML
Frames & Tables
Rounded Table Corners
Flash 5
Site Promotion
Mobile Internet: WML/WAP
Server Side Includes (SSI)
HTML - The Basics


Related Links
Stylesheets Tutorial
More XML Sites

Sitemap | Contact | Link To Us | Advertise
Report A Problem
Home : Tutorials : XML : Part 1

XML Tutorial
Part 1 - Introduction


XML is a new type of language which has been developed for the web which is different to any other type of scripting or programming language available before. Instead of being concerned with the processing and display of data, XML's primary purpose is to tell the computer what data entered actually means.

The Two Problems

There are two main reasons for the development of XML:

  1. Computers do not understand the information placed in them.. For example there is no way for a search engine, or any other computer,
    to know that this is page contains the introduction part of an XML tutorial. All it is is a collection of letters and numbers, with HTML formatting around it. The computer cannot even tell what on this page is a heading, what is text and what is an advert. This is the main problem which XML was designed to overcome. If a page or document is written in XML, a computer can understand exactly what it is about. As will probably be obvious, this has very major implications for search engine technology. If a search engine knew exactly what was on a page, it would be able to instantly provide the exact results a person was looking for, with no inaccurate matches and no half-relevant pages. This is just the revolution the over-bloated web needs.

  2. Web pages are not compatible across different devices. One of the major difficulties that web designers have today is that people are now accessing the pages from a variety of different devices. PCs, Macs, mobile phones, palmtop computers and even televisions. Because of this, web designers must now either produce their pages in several different formats to cope with this, or they must cut back on the design in order to have the page compatible across the different formats. Because XML is used to define what data means and not how it is displayed, it makes it very easy to use the same data on several different platforms.

What Is XML?

So what actually is XML? The thing about it which people find the most difficult to understand is that XML does not actually do anything. XML is not a way to design your home page and it won't change the way in which you build sites. This has made many people believe that XML is useless, as they can't see a way that it will benefit them. XML has a wide variety of benefits though, two of which were outlined above.
The real use of XML, though, is to describe data. It is used, in a similar way in which HTML is, except for the fact that there is a major difference between the two:

HTML is used to describe how data is formatted.

XML is used to describe what data actually means.

The Language

As mentioned above, XML looks, and is structured very similarly to HTML. They both use the system where tags are used to enclose the data they refer to. They both can use nested tags and both can also have attributes added to their tags.

The most revolutionary thing about XML, though is that you are not restricted to just using the normal, pre-defined tags like font and br. Instead you are responsible for making up the tags yourself. You can name them anything you like and can use them to represent anything you like. This is a feature which cannot be found in any other scripting language on the web.

Is It Difficult To Learn?

The answer to this, in short, is no. The only thing you have to learn about XML is how to structure your tags, and they are in fact almost identical to HTML tags. Most of it is just logical thinking. Before learning XML it is important that you already know HTML. It is also useful if you know a web scripting language such as PHP, ASP or JavaScript. If you do not yet know these try some of the tutorials on the site. If you are looking to be able to format a web page, not describe data, you will be better of learning XHTML, the new standard replacing H

Part 2

In part 2 you will learn how XML documents are structured and how to write your own XML document.

© 1999 - 2019