The abbreviation of extensible markup language. 1. Data Storage 2 Data Display
HTML defects, such as data content mixing with page layout and display control, lead to excessive page expansion. After the information stored in the database is converted to the HTML document format after the interpretation of the dynamic programming language, the original format of the information has become completely invisible, this causes a lot of trouble for front-end page designers and background system program developers ...??? I don't know much about it !!!
XML can clearly separate the data content from the format of the control data display effect !!! At the same time, XML is called an extensible markup language because it allows developers to create the required tags in XML precisely because of the characteristics of XML, we can use custom tags to clearly express the relationships between data.
# Regard the data stored in the XML document as an operational tree. developers can traverse, modify, and access the data as needed.
# The biggest advantage of XML is that its data storage format is not restricted by the display format.
# Common information exchange methods.
===== Xstl extensible style sheet conversion language ====
-- Solve the problem: how to display the data in XML? (Use CSS Cascading Style Sheets. The example is as follows)
Code:
- // Xml1.css
- Sid
- {
- Color: blue;
- Font-size: 36;
- Text-indent: 2em;
- Display: block;
- }
- Sname
- {
- Color: red;
- Font-size: 24;
- Text-indent: 2em;
- Display: block;
- }
- GRE
- {
- Color: red;
- Font-size: 24;
- Text-indent: 2em;
- Display: block;
- }
- TOEFL
- {
- Color: red;
- Font-size: 24;
- Text-indent: 2em;
- Display: block;
- }
- Tse
- {
- Color: red;
- Font-size: 24;
- Text-indent: 2em;
- Display: block;
- }
// Test. xml
Code:
- <? XML version = "1.0" encoding = "UTF-8"?>
- <? XML-stylesheet type = "text/CSS" href = "xml1.css"?>
- <Classmates>
- <Student>
- <Sid> 1 </Sid>
- <Sname> Figure 3 </sname>
- <GRE> 1700 </GRE>
- <TOEFL> 630 </TOEFL>
- <Tse> 120 </TSE>
- </Student>
- <Student>
- <Sid> 2 </Sid>
- <Sname> Li Si </sname>
- <GRE> 1800 </GRE>
- <TOEFL> 599 </TOEFL>
- <Tse> 110 </TSE>
- </Student>
- </Classmates>
Display Effect: display as described in the CSS stacked style table.
# Conclusion: Although CSS can well control the output style, such as color, Font, and size, it has severe limitations. For example, you cannot re-sort the elements in the document. You cannot determine and control which element is displayed and which one is not. You cannot count the data in the computing element; therefore, CSS is only applicable to final documents with relatively fixed output, which is not suitable for flexible requirements.
# CSS: relatively simple, consuming less system resources. ___ Control the display on the client.
# Xstl: memory consumption is high. ___ Process documents on the server side.
# The full name of xstl is the extended format conversion language (Extensible Stylesheet Transformation Language ). It is a language used to convert the XML document structure. The main function is to convert XML into HTML.
# If you want to extract relevant data from XML for display, you need to use the model query language provided by xstl. The so-called modular query language is a specific statement that extracts data from XML using the corresponding pattern matching rule expression.
There are three common modes: 1. Select a mode.