The Basics of XML

If you know HTML already, then you're familiar with the idea of tagging content. Tags are interspersed with data to represent “metadata” or data about the data. Let's start with the following sentence:

Homer's Odyssey is a revered relic of the ancient world.

Imagine you never heard of the Odyssey or Homer. I'll reprint the sentence like this:

Homer's Odyssey is a revered relic of the ancient world.

I've added metadata that adds meaning to the sentence. Just by adding one underline, I've loaded the sentence with extra meaning. In HTML, this sentence would be marked up like this:

Homer's <u>Odyssey</u> is a revered relic of the ancient world.

This markup indicates that the word “Odyssey” is to appear underlined. As described ...

Get XML and SQL: Developing Web Applications now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.