XML Schemas vs. DTDs

Welcome to our free XML tutorial. This tutorial is based on Webucator's Introduction to XML Training course.

Contact Us or call 1-877-932-8228
XML Schemas vs. DTDs

XML Schemas vs. DTDs

DTDs are similar to XML schemas in that they are used to create classes of XML documents. DTDs were around long before the advent of XML. They were originally created to define languages based on SGML, the parent of XML. Although DTDs are still common, XML Schema is a much more powerful language.

As a means of understanding the power of XML Schema, let's look at the limitations of DTD.

  1. DTDs do not have built-in datatypes.
  2. DTDs do not support user-derived datatypes.
  3. DTDs allow only limited control over cardinality (the number of occurrences of an element within its parent).
  4. DTDs do not support Namespaces or any simple way of reusing or importing other schemas.
Next

This tutorial is based on Webucator's Introduction to XML Training Course. We also offer many other XML Training courses. Sign up today to get help from a live instructor.