Okay, you are probably beginning to get a little bit dizzy with all of
this theoretical stuff. If you are like me, by now you are quite ready
to sink your teeth into the meat of XML.
So to conclude this section, we will run through a very simple XML
example so that you can see how it all fits together. We'll
keep it simple of course, in fact we will be sloppy and not include
a DTD (for simplicity). But in the next few sections we will
give you all the tools to start doing more advanced work.
Let's return to our contact document:
<?xml version = "1.0" encoding="UTF-8" standalone = "yes"?>
You could copy this text using your favorite word processor and save it
as plain text, naming it something like contacts.xml or test.xml.
Notice that the first line is something we have not seen before. This line is called a
processing instruction. We will talk much more about
processing instructions and their attributes later. For now, just know
that all XML documents need this first line much like HTML documents
begin with <HTML>.
Other than that, you see a set of opening and closing tags with data
(together, the tags and data are called XML Elements).