Go Back   Computer Forums > General Computing > Programming
Join Computer forums Today

Thread Tools Search this Thread Display Modes
Old 07-17-2011, 04:34 PM   #1
Solid State Member
Join Date: Jul 2011
Posts: 6
Default What is XML and how does it work?

The following article comes from here: XML Tutorial - Part 1

I'm not affiliated with this article in any way. If you'd like to read more about the subject, follow the above link.


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:

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.

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
Sylfaen is offline   Reply With Quote

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

All times are GMT -5. The time now is 01:11 PM.

Powered by vBulletin® Version 3.8.8 Beta 4
Copyright ©2000 - 2016, vBulletin Solutions, Inc.
Search Engine Friendly URLs by vBSEO 3.6.0