XML Schema: An Alternative to DTDs

XML Schema is an alternative and, some say, a better way to define the structure and content of XML documents. XML Schema actually goes way beyond the DTD by defining not only the legal ordering and nesting of tags but also the content types (integer, character, string, and so forth) associated with those tags. XML Schema brings XML closer to what relational databases can do by enabling you to have rigidly defined types.

As of this writing, XML Schema is gaining acceptance in the XML community, and more software is starting to support it, but it is still quite young.

DTDs Versus XML Schema

You may ask, “Why did we bother with all that DTD stuff if now you're telling me XML Schema is better?” While XML Schema ...

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.