The prolog contains optional information such as the XML version the document conforms to, information about the character encoding used to encode the contents of the document, and a reference to either a document type definition (DTD) or XML Schema document which describes the grammar and vocabulary of the document. The XML Schema document is the more modern way to describe XML grammar and vocabulary. XML Schemas and DTDs are usually stored in external documents and the prolog can reference both XML Schemas and DTDs.
This simple example illustrates the prolog:
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE maillist SYSTEM "maillist.dtd">