XML document structure

Fundamental requirement to all XML doc: it must be well-formed:

  1. It contains prolog (heading) and

    exactly one root element.

    Before and after the root element, there can be processing instructions, comments (Misc).

  2. It meets all the well-formedness constraints given in the specification.

  3. Each of the parsed entities which is referenced directly or indirectly within the document is well-formed.