Chapter 2. Creating Well-Formed XML Documents

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

In HTML, about 100 elements already are defined. Browsers can check the HTML on a Web page and display that page as they see fit. In XML, you have more freedom—and, thus, 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, however, XML documents are subject to a number of rules that allow them to be handled in a useful ...

Get Inside XML 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.