Document Type Definitions

There are two types of XML parsers: validating and nonvalidating. A nonvalidating parser checks an XML document to be sure that it's well formed and returns it to you as a tree of objects. A validating parser, on the other hand, ensures the document is well formed, then checks it against its DTD or schema to determine whether the document is valid. In this section, we'll discuss the first of these validation methods, the DTD.

A DTD is a somewhat antiquated though still widely used method of validating documents. DTDs have a peculiar and rather limited syntax, but they are still found in lots of XML implementations. Over time, it's likely that XML schemas will become the tool of choice for setting up data validation. ...

Get Guru's Guide to SQL Server Architecture and Internals, The 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.