I. xml concepts
Extensible Markup Language, which is translated into extensible markup language. XML technology is released by W3C organizations. Currently, we recommend that you follow the xml1.0 specification released by W3C at 2000.
Ii. Purpose of learning XML
There is a large amount of relevant data in real life, as shown in (figure-1 ).
Figure-1
How can such data be handed over to the computer for processing ?,The fundamental goal of XML is to describe(Figure 1)Data that often appears in real life.
In XML, it allows users to customize tags. A tag is used to describe a piece of data. A tag can be divided into start tag and end tag. Other tags can be used to describe other data between start tag and end tag, to describe the data relationship. For example:
1 <? XML version = "1.0" encoding = "UTF-8"?> 2 <China> 3 <Beijing> 4 <Haidian> </Haidian> 5 <Fengtai> </Fengtai> 6 </Beijing> 7 <Hunan> 8 <Changsha> </Changsha> 9 <Yueyang> </Yueyang> 10 </Hunan> 11 <Hubei> 12 <Wuhan> </Wuhan> 13 <Jingzhou> </Jingzhou> 14 </Hubei> 15 </China>
Iii. common XML applications
In addition to storing relevant data, XML is often used as a software configuration file to describe the relationship between program modules.
In a software system, to improve the flexibility of the system, the module it starts is usually determined by its configuration file. For example, when a software is started, it needs to start two modules, A and B, when both modules A and B are started, A1, A2, B1, and b2 are required. To accurately describe the relationship, it is most appropriate to use XML files.