As mentioned previously, XML documents have both a logical structure and a physical structure. An XML document consists of text (data) plus the XML markup. The entire sequence of character codes in an XML document must map into allowed Unicode characters [Unicode]. An XML document consists of storage units called entities. These entities contain either parsed data or, rarely, unparsed data. Parsed data, in turn, consist of characters that form data and markup. Markup, in turn, encodes a description of the logical structure of the XML document.
Markup properties include entities, CDATA (Section 3.4.5), declarations, DTDs, elements, comments, character references, and processing instructions. Table 3-4 outlines the structure of an XML document.