• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint

Understanding DTDs

An XML DTD is the method by which you define the syntax and structure of an XML language. You'll recall that XML itself is a meta-language that lets you build markup languages that follow certain rules sets. A DTD adds additional rules that state which elements can be used with others, which attributes are allowed in a tag, and what the default values of an attribute should be.

What Is a DTD?

A DTD is a formal specification for a language. It's designed to be machine-readable for automatic parsing, but also understandable and capable of being produced by a human with a text editor—as is the case with XHTML and XML. DTDs are written in a language that will seem familiar to you, as it includes tags, brackets, and values, although a few differences —such as needing no closing tags or even closing "/" marks—might be a little confusing at first.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint