Document Type Declaration

The first thing you need to look at is the Document Type Declaration. The Document Type Declaration occurs in the prolog of an XML document.

The Document Type Declaration can refer to either or both of two possible locations for the Document Type Definition—the internal subset or the external subset. In other words, all of the Document Type Definition can be within the XML document (in the internal subset), all of the Document Type Definition can be outside the XML document (in the external subset) in a separate file (typically with the file extension .dtd), or part of the Document Type Definition can be within the XML document and part can be outside.