To be perfectly correct, we must explain that "XML" has come to mean many subtly different things. An "XML document" is a document containing content that conforms to a markup language defined from the XML standard. An " XML Document Type Definition" (XML DTD) is a set of rules—more formally known as " entity and element declarations"—that define an XML markup language; i.e., how the tags are arranged in a correct ("valid") XML document. To make things even more confusing, entity and element declarations may appear in an XML document itself, as well as within an XML DTD.
An XML document contains character data, which consists of plain content and markup in the form of tags and XML declarations. Thus: