XML is an abbreviation of Extensible Markup Language, and its predecessor is SGML, or that XML is a subset of SGML. Simply put, XML is a document format as a standard, which is conducive to data exchange between different intercom. From the surface, XML is a language, but it is also a language that creates and defines other languages. Through a set of well-defined specifications, we can easily expand it.
Let's take a look at an actual XML: (just the simplest example, in order to illustrate the basic structure of XML)
<
Customer-repository
>
<
Customer
Index
= "C82fb7e9982a02fd"
>
<
Name
First-Name
= "Brian"
Last-Name
= "Molko"
/>
<
Register-Date
>
2005-01-01
Register-Date
>
<
Visits
>
3
Visits
>
Customer
>
<
Customer
Index
= "BADE12908E72CB21"
>
<
Name
First-Name
= "Alanis"
Last-Name
= "Morissette"
/>
<
Register-Date
>
2005-02-01
Register-Date
>
<
Visits
>
1
Visits
>
Customer
>
Customer-repository
>
In view of it, our XML file defines a group of customers, each customer has the corresponding ID, name, registration time, and number of visit. This is the most basic XML, which is very similar to HMTL, but it can have a custom label, on the other hand, it also requires a more stringent grammar, such as the label will be opened and close and cannot overlap. Not only this, usually each XML file will correspond to a set of stringent defined syntax so that they will be processed correctly, and I will make a more detailed description later.