Before XML and similar languages came on the scene about ten years ago, most electronically accessible data was stored in "flat" files. By "flat," we mean that the data expressed in the files had no inherent structure, and wasn't part of any larger structure. Every organization had its own scheme for expressing and organizing data in these files, and while there were some attempts to construct and share common formats, these tended to be obscure and limited to particular types of business transactions. What was needed was a standard means of formatting data that could be used for all sorts of purposes and by all kinds of computing platforms. SGML, and later XML, serve this purpose.
XML stands for "Extensible Markup Language," so what the heck is a "markup?" Well, a "markup" is a block of text in a document that tells us something useful about the other text in a document. Suppose two students, Harrry and Sally, are working on a text document. They decide to keep track of who wrote what using XML-style markups. A section of the document might look something like this:
<harry-wrote>It was a dark and stormy night.</harry-wrote>
<sally-wrote>Waves pounded the cliffs beneath the great house.</sally-wrote>
This part of the document includes a sentence written by Harry and another written by Sally. We can tell who wrote what because of the "markup" surrounding each sentence. Each chunk of text written by starts with the special notation "<harry-wrote>" and ends with a similar notation, "</harry-wrote>." Sally's section are set apart using their own special markup. In XML, these notations are known as "tags." Each block of "marked up" text consist of a begin tag, some content, and an end tag. Whatever meaning is associated with the tags is attached to content between them. In this case, we know that everything between the "sally-wrote" begin tag and "sally-wrote" end tag was written by Sally.
Every tag has its own name, such as "sally-wrote," known simply as a "tag name." Only two different tag names appear in our brief example, "harry-wrote" and "sally-wrote."
A tag name can consist of pretty much anything, but all begin tags start with a left bracket and end with a right bracket.
End tags are pretty much the same. The only difference is inclusion of a forward slash before the right bracket.
What about the "X" in "XML?" What makes it "extensible?" Well, XML is extensible in that anyone is free to make up their own set of tags and assign meaning to them. By coming up with the "harry-wrote" and "sally-wrote" tags Harry and Sally and coming to a mutual agreement concerning what those tags mean, they have created their own tiny, XML-compliant markup language.
Note: The sample code in this tutorial makes use of the Tectonic programming language
(featured in the Delve SOA Fast-Prototyping Toolkit)
Not sure exactly what the heck XML is? Get started with this
excellent wikipedia article:
> Click Here!