What Is a Well-Formed XML Document?
The W3C, which is responsible for the term well-formedness, defines it this way in the XML 1.0 recommendation (I'll take a look at each of these stipulations later):
A textual object is a well-formed XML document if:
Taken as a whole, it matches the production labeled document.
It meets all the well-formedness constraints given in this specification (that is, http://www.w3.org/TR/REC-xml ).
Each of the parsed entities which is referenced directly or indirectly within the document is well-formed.
W3C calls the individual specifications within a working draft or a recommendation productions. In this case, to be well-formed, a document must follow the "document" production, which means that the document ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access