Page 10 of 28PREVNEXT

XML: What's it all about?

A sample XML data file

Sample XML data.

Suppose you run a veterinary clinic and you want to use XML to store data for your various animal clients. Your XML data files will contain the data for each animal. Each piece of that data is surrounded by a tag, and each tag describes what the piece of data means. The combination of tag and data is called a node.

The illustration shows a sample XML data file for a cat named Izzy. The tags are the combinations of angle brackets and text:

<CAT>, <NAME>, <AGE>

and so on.

Tags actually consist of two parts, an opening tag and a closing tag like so:

<BREED> … </BREED>

The forward slash (/) is what makes a tag a closing tag. The opening and closing tags surround any data, like so:

<BREED>Siamese</BREED>

In XML, the tags are designed to clearly describe every piece of data. If someone asks what all those tags mean, you can say that they mean whatever you need them to mean. That's a part of what makes XML "extensible." In this case, you know what "yes," "no," and "Izzl138bod" all mean.

Because the tags describe the structure and meaning of the data, then any computer program or system that supports XML can understand that data and put it to use. For instance, you could load the cat's name and the owner's name from the data into a vaccination report and a payment request simultaneously.

Those are just a couple of examples of how you can put XML to work. You can use your data in reports, Web pages, and databases, and that's just for starters. When you need to exchange data, XML can meet almost any business, scientific, or academic need.

Page 10 of 28PREVNEXT