Each XML document has both:
XML provides a mechanism, the document type declaration:
- to define constraints on the logical structure
- and to support the use of predefined storage units (physical structure).
The document is composed of:
- character references,
- and processing instructions
They are indicated in the document by explicit markup.
An XML document may consist of one or many storage units, called entities.
An entity may refer to other entities to cause their inclusion in the document.
It is possible for XML documents which are equivalent for the purposes of many applications to differ in physical representation. For example, they may differ in their: