1. What is XML?
XML is an abbreviation for extensible Markup Language, known as Extensible Markup Language, which refers to the user can customize markup based on XML rules. Example 1-1=========================city.xml< China >< Sichuan >< city > Chengdu </City >< city > Guang ' an </City ></Sichuan >< Hunan >< city > Changsha </City >< city > Xiangtan </City ></Hunan ></China >=========================< China >,< Sichuan >,< Hunan >,< City > are tags that users create themselves, calling them elements that must appear in pairs. in XML, complex information with tree hierarchies can be accurately described through nested relationships of elements, so more and more applications use XML format to hold relevant configuration information for easy reading and modification.
2. Comparison of XML and HTML
2.1 Markup in HTML is used to display data, and tags in XML are used to describe the nature and structure of the data. 2.2 HTML is case-insensitive, and XML is strictly case-sensitive2.3 HTML can have more than one element, XML can only have and must have a unique root elementas the above example, the outermost is China, can not increase the level of marking the United States, the top target can only have a2.4 The attribute value in HTML can be quoted or not, the XML must be enclosed in quotation marks2.5 spaces in HTML are automatically filtered, and spaces in XML are not automatically filtered2.6 tags in HTML are predefined, and tags in XML can be customized based on XML rules in addition to predefined. 2.7 It should be emphasized that XML is not an upgrade of HTML or an alternative to HTML, although the two styles are similar, but their application areas and scope are completely different. 160916
XML for getting started with the Web