What is XML?
Have you ever heard of XML and wondered what it is and how you could use it in web projects?
XML stands for Extensible Markup Language and has to do with the description and structuring of data. Basically, it's a set of rules for describing a syntax (language structure) that you can use to define data, exchange it with computer programs, and publish it to the Web or elsewhere.
XML is "extensible" because you can shape the way data is defined. Here's an example:
<full-name>
<first-name>Sabrina</first-name>
<last-name>Curzi</last-name>
</full-name>
If you know how to write HTML tags, then you probably recognize the tag syntax. In XML, you make up the tag names that describe the data. HTML is different because you use a predefined set of tags. It's also different because HTML is used to describe the presentation of data, not define it like XML does.
So Why Should You Use It?
One of the advantages of using XML is that you can separate the data from the display of it. This means that if you need to add or edit some data, you don't need to also change the code that displays it. The data is organized and structured so that finding information is easy. If you need to hand off your work to someone else, XML makes it easy for that other person to learn the structure of the data.
In my Five-Cities.com website, the Flash-based photo galleries use an XML document to list the photos and captions. In this document the location of the photo file is defined and I can type the caption directly into the document. This makes it very easy and quick to add and edit the contents of the photo gallery since I don't even need to touch the Flash file. Check it out here: www.five-cities.com
If you'd like to learn more about XML, here's a tutorial by the W3Schools: www.w3schools.com/xml/default.asp

