- The XML Declaration must be declared in lowercase "XML" and set the version attribute, which appears in the first line.
- You must have one root node.
- All tags must be arranged in a nested (tree-like) manner.
- Except for the tag with empty content, all the tags must appear in pairs as the start tag and end tag.
- "/" Must be added at the end of the tag with an empty content.
- The tag name and attribute must be legal and case sensitive. (The first character must be English letters or other characters. If it is declared as gb2312, you can use Chinese characters, "_", or ":". Except the first character, other characters must be English letters or other characters. If declared as gb2312, Chinese characters, "_", ":", "-", or ". "or" Number ")
- Before and after the attribute value is specified, it must be surrounded by "" or.
- Special characters must be written as required. (For example, replace "<" with & lt; ">" with & gt; "&" with & amp; "with & quot; replace "'" With & apos ;)
The XML file that meets the preceding eight conditions is called the well-formed XML file.