XML - Extensible Markup Language
Nature:
XML: A Markup Language for Marking up Electronic Documents to Make them Structural
features
(1) XML can separate data from HTML
(2) XML can be used to exchange data (among incompatible systems)
(3) XML can be applied in B2B
(4) Use XML to share data, plain text, easy to read, and easy to share
(5) XML can make full use of data
(6) XML can be used to create new languages
Format
XML is plain text mode
1. There must be a statement
<?xml version="1.0" encoding="utf-8"?>
2. Case sensitive
Therefore, it is best to develop a uniform capitalization habit
3. There is one and only one root element
The start of the root element should be placed at the front of the document, and other elements are child elements of this element
The end tag of the root element should be placed at the end accordingly
4. Use quotation marks for attribute values
Can be single quotes or double quotes
5. All tags must have a corresponding closing tag
Tags must appear in pairs (empty tags are no exception)
Differences from HTML
(1) In terms of scalability: XML allows users to define new identifiers and attribute names according to their needs, so as to better modify data semantically.
(2) Structural aspects: HTML does not support deep structural description, XML file structure nesting can be complex to any degree, and can represent object-oriented hierarchical levels
(3) Verifiability: HTML does not provide specification files to support application software to verify the structure of HTML files, while XML files can include a syntax description so that applications can verify the structure of this file.