DTDs may also be used with documents encoded in XML. When a user wishes to print or display a document encoded according to an XML DTD, the software (i.e. the parser, compiler or other application) uses the XML DTD file to determine how to process the contents of the XML document.