Chapter 2. Creating Well-Formed XML Documents

In the previous chapter, we got our start in XML and got an overview of how XML lets you structure your own documents, what XML is all about, and some of the uses you can make of it. It's time to take a look at XML in more depth and to sharpen our XML understanding until it's crystal clear.

In HTML, about 100 elements already are defined. Browsers can check the HTML in a Web page and display that page as they see fit. In XML, you have more freedom—and so more responsibility. In XML, you define your own elements, and it's up to you to decide how they should be used. Despite their apparently free-form nature, XML documents are subject to a number of rules that allow them to be handled in a useful and ...

Get Real World XML now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.