Explained with xml examples:
The code is as follows:
1. xml declaration:
(1). The xml statement should be placed on the first line of the document;
(2), encoding: document character encoding, such as utf-8, gb2312, etc.
(3) Standalone: The value is yes or no, optional, indicating whether the document definition is independent, that is, whether it is related to other documents. The default is no.
2. Root element
The outermost
3. xml element/tag/node
If there is no content in the tag, for example, there is no entity content between
4. Spaces and line breaks in tags
For spaces and line breaks that appear in thetag, the xml document will treat the spaces and line breaks as original content. So, pay special attention when programming.
5. Naming convention of xml tags
(1) Case sensitive;
(2) Cannot start with a number or "_";
(3) It cannot start with special characters such as xml, XML, or Xml;
(4) Cannot contain spaces;
(5) Cannot contain colon.