DTD objects have two purposes: They are containers for global declarations that apply to the
whole XML document. This includes the character set, the
standalone declaration, and all declaration that can appear
in the "DTD part" of a document., Also, they express formal constraints the document must fulfill
such as validity, or (less ambitious) well-formedness.
Normally, programmers neither need to create such objects, nor to
fill them with data, as the parser already does this.