Chapter 3. Valid XML Documents: Creating Document Type Definitions

Chapter 2, "Creating Well-Formed XML Documents," explains all about creating well-formed XML documents. However, there's more to creating good XML documents than the simple (although essential) requirement that they be well-formed. Because you can create your own tags when you create an XML application, it's up to you to set their syntax. For example, can a <HOUSE> element contain plain text or only other elements such as <TENANT> or <OWNER>? Must a <BOOK> element contain a <PAGE_COUNT> element, or can it get by without one? It's up to you to decide. Using your own custom XML syntax is not only good for making sure that your documents are legible—it can also be essential for ...

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.