Tags and XML
Most website creation languages use a form of 'text-markup'. The text of the page is written, and then various 'tags' are added, which change the way the text will appear when viewed online (formatting, links, etc.). A tag usually appears in the form <tag>. Once a tag has been opened, it applies to all the following text, until it is closed with a tag of the same name, but a /. For example,
My name is <bold> Sophie </bold>
would appear as
My name is Sophie
There are many different tags, each of which corresponds to a different attribute.
What is XML?
Extensible Markup Language, often abbreviated to XML, is a general purpose specification for representing data, with the user being able to define the structure. It is used to store data in such a way that it is easy to use over the Internet, is supported by a wide variety of applications and is easy to read. (W3C XML Core Working Group, 2006)
The structure of the data is described through the use of "tags", such as
<gallery> in the code below. These describe what data is
stored between the opening and closing tags. Tags can be nested inside of
other tags, to represent additional pieces of data that are related to the
parent.
An example of an XML document is shown below:
<?xml version="1.0" encoding="UTF-8" ?>
<gallery>
<image id="photo1">
<title>My First Image</title>
<source>photo1.jpg</source>
</image>
<image id="photo2">
<title>My Second Image</title>
<source>photo2.jpg</source>
</image>
</gallery>