5. differences between XML and HTML: both XML and HTML come from SGML. they both contain tags and have similar syntax. The biggest difference between HTML and XML is that HTML is a fixed markup language, it uses inherent tags to describe and display webpage content. For example, H1 represents the difference between. XML and HTML.
Both XML and HTML come from SGML. they both contain tags and have similar syntaxes. The biggest difference between HTML and XML is that HTML is a fixed markup language, it uses inherent tags to describe and display webpage content. For example, <H1> indicates the title of the first line, which has a fixed size. In contrast, XML does not have a fixed mark. XML cannot describe the specific appearance and content of a webpage. it only describes the data situation and structure of the content.
This is a qualitative difference: Web pages mix data and display, while XML leaves the data and display.
For example, in myfile.htm, we only care about the page display method. we can design different interfaces and typeset pages in different ways, but the data is stored in myfile. xml.
(If you are a programmer, you will be surprised to invent it, which is very similar to the idea of modular object-oriented programming! Why is a web page not a program ?)
This difference makes it easy, efficient, and scalable for XML in terms of network utilization and information sharing. Therefore, we trust XM as an advanced data processing method, which will bring the network to a new realm.
VI. strict XML structure
Based on the experiences and lessons learned from the loose HTML structure, XML maintains a 'good mode' as soon as it is started '.
Let's first look at some HTML statements, which are everywhere in HTML:
1.
Sample
2. <B> <I> sample </B> </I>
3. <td> sample </TD>
4. <font color = red> samplar </font>
In XML documents, the syntax of the preceding statements is incorrect. Because:
1. all tags must have an ending mark;
2. all XML tags must be fairly nested;
3. all XML tags are case sensitive;
4. all marked attributes must be included in;
Therefore, the correct syntax of the preceding statement in XML is:
1.
Sample
2. <B> <I> sample </I> </B>
3. <td> sample </td>
4. <font color = 'red'> samplar </font>
In addition, XML tags must comply with the following naming rules:
1. the name can contain letters, numbers, and other letters;
2. the name cannot start with a number or;
3. the name cannot start with xml (or XML or Xml;
4. the name cannot contain spaces.
Any errors in the XML document will produce the same result: the web page cannot be displayed. Browser developers have reached an agreement to perform strict and picky parsing of XML, and any small error will be reported. You can modify myfile. xml above, for example, change <email> to <Email>, and use IE5 to open myfile. xml directly. an error message page is displayed:
XML easy learning manual
Ajie
Ajie@aolhoo.com
20010115
7. More information about XML
Now you know:
1. what is XML;
2. relationships and differences between XML, HTML, and SGML;
3. simple use of XML.
Congratulations! You no longer know nothing about XML and are at the forefront of network skills. The entire learning process does not seem very difficult :)
If you have more interests in XML, I hope you can further understand the specific materials of XML and other practical application skills. please refer to our next chapter: the concept of XML.