- 12 -
City: Muddy Waters
State: FL
ZIP: 55544
From a computer’s
perspective, there is no indication of the inherent structure of the
information. You might think that, “anything with a colon
in front of it is a field name,” but
there’s an underlying structure to this data that you cannot pick out from this clip. To
show you what we mean, look at a snippet of XML that could be used to represent the
preceding information:
Alley Gator
515-5551235
112, Main Street
Muddy Waters
FL
55544
See what we mean by the “structure of the information?” Visual inspection of the above
code tells us something about how the information is organized. By looking at it, we can
tell that Contact_Information
consists of a Name, a Phone_Number, and an Address
field. Furthermore, the Address section can be broken into subfields. Armed with the
knowledge
of the structure, we can then perform more interesting tasks, such as
displaying only the information contained in the Name and Phone_Number tags. We
could also perform more intelligent searches based on information
contained within
certain tags as opposed to information contained within entire documents.
So XML Has Its Own Set of Tags Such as and ?
No, as the name implies,
the set of tags is
extensible
so you can create them as you go
along. Although a few tag names are reserved in XML, you
can pretty much create your
own tags to represent your data as descriptively as you’d like.