To create a well-formed XML document, it is necessary for it to have a root element. A root element is a unique element that contains all other elements in the XML document.
The XML document cannot contain more than one root element.
The following code is an example of a well-formed document:
<address>
<city> Delhi </city>
<state> Delhi </state>
<country> India </country>
</address>
Consider the same code written in the following way:
<city> Delhi </city>
<state> Delhi </state>
<country> India </country>
The preceding code is not a well-formed document, since it does not contain a
root element.