XML documents must follow certain formatting rules to be considered well-formed. They must have a single root element with matching start and end tags for all other elements. Attribute values must be enclosed in quotes. Well-formed XML documents can be represented as a tree structure with a root node containing child nodes, some of which may themselves contain child nodes. The fundamental unit of XML is the element, which can have attributes and content.