From html to xml

zhaozj2021-02-08  234

(Author: Liao Order December 2000 04 Ri 12:46) XML (eXtensible Markup Language, Extensible Markup Language), is one of the most popular network technology, known as "second-generation Web language", "Next Generation The cornerstone of the network application. " Since it has been put forward, it has almost supported support from all the industry in the industry. So, when XML is now not universal, hurry to grab the priority to keep future rice bowls. HTML disadvantages talk about XML, have to talk about "First Generation Web Language" - Html. HTML is old, has been eliminated (exaggerated, but there is no HTML 4.0, it is replaced by XHTML defined according to XML). Poor us, it's hard to get it, you will use HTML, but I have to discard it. why? HTML can act in driving the vigorous development of WWW in these years. Want to do things on the Internet, almost no HTML can't. But HTML has a fatal disadvantage, that is: is only suitable for communication between people and computers, not suitable for communication with computers. Everyone knows that HTML is to define the documentation in front of us through a lot of tag, that is, HTML is a "display description" language, which describes how web browser should be on page The layout, graphics, etc. are arranged, and there is no description of the most important thing on the Internet. These texts that pass HTML, the graphical content is easy to understand, and it is difficult to understand the meaning of the text within these markers. For example, we design a program that automatically goes to major online shopping malls to catch up with the latest price. But the problem is that each online shopping mall may write a product name and price in the web page, all of them have their own way of writing, such as: price , and price , there is a more complex form. So how do our programs know that what is the price information in the mark? For example, in html, apple represents the case with Apple in a web browser, does not indicate what Apple represents, is Apple? Is Apple? Still what else? This causes HTML not to reveal the meaning of information in the file. In addition, another problem with HTML is that its markings are fixed, and users cannot increase their meaningful tags. Moreover, the specifications of the major browsers do not have the same size, so that we can use the HTML to be displayed normally by all browsers, we can only use W3c to define our defined tags to create a web page. In today's online world, as e-commerce is growing and web-based applications, a large number of information needs to be rapidly processed. In fact, most of the information on the Internet is initially stored in a well-structured database, and the information is stored in the corresponding field, such as employee file, name, gender, department, etc. For "Zhang San" data, the computer can know that it represents an employee's name according to the location it stores. However, once these data is tuned, after converting CGI, ASP, JSP, PHP, the original meaningful data has become a combination of HTML tags without a specific meaning. Users must resolve this data through their own "mind", and "manually" will record them, process, and obviously handle the speed of information.

If we can pass the data of the original structure in the database to be passed between the computer, then it will definitely speed up the speed of the information processing. Obviously, the HTML is not available, and due to the different computer systems, operating systems, and the database used, different computers should be quite difficult and very troublesome, in order to make a variety of different computers. It can exchange information between each other, it seems that HTML is essential. How to solve this problem? Welcome XML using XML to solve the above problems. W3C describes the XML as follows: "XML describes a class of data objects called an XML document, and partially describes the behavior of the computer program that handles their computer program. XML is an application instance of SGML or a restricted form. From Structure, XML document complies with the SGML document standard. Used in publishing industries, very complex, based on SGML development is very expensive, only in a few big companies and government departments, XML retains SGML 80% function, reducing 20% ​​complexity, so Make the development of XML applications that make XML enters "ordinary people's home". Tip: HTML is only suitable for communication between people and computers, is not suitable for computer and computer communication. The XML and HTML differs from: XML allows us to express the actual document content based on our documents we want to express, such as: We can define the This is actually meaningful Mark (available in Chinese). In XML, we only need to pay attention to the contents of the document, and the representation of the document is handed over to the CSS (laminated style sheet) and XSL (Extensible style language) to complete, if the XML file is only used to exchange information between computer and computers Just only need an XML file, if you want to display the information in the XML file in some form, if you display it through the browser, you can reference a style table file to define how the browser displays information in the XML file. Moreover, XML does not have a fixed tag collection as HTML, which is actually a language to define the language, that is, users using XML can define endless tags to describe any data elements in the document, break through the HTML fixed tag collection Constraints, organize the contents of the document into a rich and complete information system. The XML has three main elements: Schema (mode), XSL (Extensible Stylesheet Language Extensible Style Language) and XLL (Extensible Link Language Extended Link Language). Schema specifies the logical structure of the XML document, defines the relationship between elements, elements in the XML document, and the relationship between elements and elements, which helps XML parser check whether the XML document mark is legal; XSL is used Specifies the language of the XML document expression, similar to CSS; XLL further expands the simple links that have been previously web.

转载请注明原文地址:https://www.9cbs.com/read-1402.html

New Post(0)