Introduction Welcome to this tutorial on XML and DTDs. This tutorial assumes that you have been introduced to the possibilities of XML and want to learn more about the nuts and bolts of creating an XML document or a DTD. If your unsure of what exactly XML is, we encourage you to look over the Introduction to XML Tutorial. This tutorial aims to show you a few things. First off we want to show how both create a well formed XML document and a DTD that validates that XML. We'll also attempt to explain what well formed and valid mean when talking about XML and describe the anatomy and structure of XML. We'll also take you through why you would want to create a DTD, the steps of creating a DTD and some examples of DTDs currently used in the real world. There are a few definitions when talking about XML that would be helpful. First of all, XML stands for eXtensible Markup Language, a standard which was created by the W3 Group for marking up data. A DTD is a Document Type Definiton, a set of rules defining relationships within a document and this can both be either internal within the document or linked externally through a hyper reference. Finally, there is an XML parser which is software that reads XML code and documents which then interprets or parses this code according to XML standard. A parser is needed to perform actions on XML. For example, if you wanted to compare an XML document to a DTD you would need a parser. Let's talk about the anatomy of XML next. If you ever done some HTML coding, creating an XML document will seem very familiar. Like HTML, XML is based on SGML, a Standard Generalized Markup Language, and designed for use with the web. If you've never done any HTML coding before after creating an XML document you should find that creating an HTML documents easy.