You should consider the following rules to write an XML document.
1) It should have a root element.
2) All tags must be closed.
3) Spaces are not allowed in tag names.
4) All tags must be nested properly.
5) XML tags are case sensitive.
6) Use the attribute values within quotes.
7) Whitespace is preserved in XML.