Examples


History
Examples
Benefits
Rules
Links

Displaying the XML

HTML
Example 1

XML
Example 2
style sheet

 

Hello, My Name Is XML

Well, by now you are probably wondering just what exactly XML looks like, so why don't we take a look at some XML:

<DOCUMENT>
<GREETING>Hello!</GREETING>
<TEXT>This is XML!</TEXT>
</DOCUMENT>

That's XML. It's a markup language for creating your own tags, which can be used to markup your content. The tags that you create in XML are tags that make sense to you, or the people using your data. Rather than being arbitrary tag names selected by a standards body, the tag names you choose will reflect the nature of the data you are tagging. Of course, it's a little more complex than that, but those are the basics. With XML you can make your own tag pairs and use them in your documents to impart meaning on the data. Still a little confused? Well, let's look at it this way; say we were writing the previous example in HTML. It might look something like this:

<HTML>
<H2>Hello!</H2>
<p>
This is HTML!
</HTML>

It looks similar, but not exactly the same. We still see tags, but now those tags don't really make any sense, unless you already know HTML. If you are familiar with HTML, you know that the <H2> tag is a headline, and that the <p> tag represents a paragraph. But with the XML example, the tags are clearly readable to humans. That's one of the advantages of XML: You can create tags that make sense to you. Of course, that means they might not always make sense to others!

So is XML a predefined set of tags that makes sense? No. Not at all. What it really is, is a set of guidelines for you to use when creating your own tags and your own markup languages. If you want to create a special markup language for your dog called Rover Markup Language or RML, you are free to do so. It might look like this:

<DOGHOUSE>
<FOOD>Kibble</FOOD>
<TOY>Chewy Bone</TOY>
<ENEMY>Mailman</ENEMY>
</DOGHOUSE>



Example 2