xml XML document with an internal DTD


A DTD is referred to as an internal DTD if elements are declared within the XML files. To reference it as internal DTD, standalone attribute in XML declaration must be set to yes.

An XML that describes a note that contains property to, from and message along with internal DTD will look like:

 <?xml version="1.0" encoding="utf-8" standalone="yes"?>
<!DOCTYPE note [
<!ELEMENT note (to,from,message>
<!ELEMENT message (#PCDATA)>
<message>Stack Overflow is awesome </message>