A DTD can be included internally within an XML source file. An internally declared DTD is required to be wrapped in a DOCTYPE definition.
<!DOCTYPE rootelement [element-declarations]>
<?xml version="1.0"?> <!DOCTYPE rootelement [ <!ELEMENT rootelement (childelement1)> <!ELEMENT childelement (#PCDATA)> ]> <rootelement> <childelement> Child element.</childelement> </rootelement>