Semantic Markup

Since identifying the data gives you some sense of what means (how to interpret it, what you should do with it), XML is sometimes described as a mechanism for specifying thesemantics (meaning) of the data.

In the same way that you define the field names for a data structure, you are free to use any XML tags that make sense for a given application. Naturally, though, for multiple applications to use the same XML data, they have to agree on the tag names they intend to use.

Here is an example of some XML data you might use for a messaging application:

<message> 
<to>you@yourAddress.com</to> 
<from>me@myAddress.com</from> 
<subject>XML is really cool</subject> 
<text>How many ways is XML cool? Let me count the ways...</text> 
</message>

The tags in this example identify the message as a whole, the destination and sender addresses, the subject, and the text of the message. As in HTML, the <to> tag has a matching end tag: </to> . The data between the tag and and its matching end tag defines an element of the XML data. Note, too, that the content of the <to> tag is entirely contained within the scope of the <message>..</message> tag. It is this ability for one tag to contain others that gives XML its ability to represent hierarchical data structures

Need More Help?Esko Help CenterSoftware Support PortalProduct information on Esko.com