the difference between HTML and XML (GOTO)
2010-04-21 08:45:36| Category: Learning-related | Tags: | Report | Font size Big medium small subscription
What is HTML
the full spelling of the HTML is hypertext Markup Language, Chinese is the Hypertext Link Markup Language. HTML (Hypertextmark-uplanguage) is the Hypertext Markup Language, which is the description language of www. The purpose of the HTML language is to make it easy to connect text or graphics stored on one computer with text or graphics from another computer to form an organic whole, regardless of whether the specific information is on the current computer or on other computers in the network. We just use the mouse to pick an icon in a document, and the Internet immediately goes to the content associated with that icon, which may be stored on another computer in the network. HTML text is a descriptive text made up of HTML commands that describe text, graphics, animations, sounds, tables, links, and so on. The structure of the HTML consists of the head (head) and the body (body), where the head describes the information required by the browser, while the body contains the specific content to be described. In addition, HTML is the universal language of the network, a simple, universal, all-in-one markup language. It allows web-makers to create complex pages of text and images that can be browsed by anyone else on the web, regardless of the type of computer or browser used.
What is XML
XML, Extentsible Markup Language (Extensible Markup Language), is a meta-language used to define other languages, formerly SGML (Standard Universal Markup Language). It has no tag set (tag set) and no grammatical rules (grammatical rule), but it has syntactic rules (syntax rule). Any XML document must be well-constructed for any type of application and correct parsing (well-formed), that is, each open tag must have a matching end tag, not a reversed-order label, and should conform to the requirements of the specification in the statement composition. An XML document can be valid (valid), but it is not necessarily a valid requirement. A valid document is a document that conforms to its document type definition (DTD). If a document conforms to a schema, then the document is schema-valid (schema valid).
The relationship between HTML and XML
1, in fact, HTML and XML do not have a very inevitable connection, XML is not to replace HTML, in fact, XML can be seen as a complement to HTML.
2. The goal of XML and HTML is different: HTML is designed to display data and focus on the appearance of the data, while XML is designed to describe the data and focus on the content of the data.
3, similar to HTML, XML does not take any action. Although an XML tag can be used to describe the structure of an item such as an order, it does not contain any code that can be used to send or process the order and ensure delivery by that order, and others must write code to actually perform these operations on the data in XML format. Unlike HTML, XML tags are defined by the author of the schema or document and are unrestricted. HTML tags are pre-defined; HTML authors can only use tags that are supported by the current HTML standard.
4. Unlike HTML, XML tags are defined by the author of the schema or document and are unrestricted. HTML tags are pre-defined; HTML authors can only use tags that are supported by the current HTML standard.
A few common problems
Q: What is the advantage of XML and HTML?
A: In fact, there is no comparability between XML and HTML, although they have a certain connection, but their respective functions and objectives (point of emphasis) is not the same, the application is different, one thing to mention is that XML is more standard than the HTML.
Q: Can HTML support static space and XML?
A: Yes, just ensure that the client browser version is not less than 6.0
Q: I want to be a Web site, which language is good to use?
A: For large web sites, because of the large amount of updates, not to use HTML, because XML support dynamic update, can be used, but not the best choice, and for small sites, in order to improve the speed of the page, it is recommended to use HTML writing.
Q: Can HTML and XML be converted to each other?
A: Yes, in order to better adapt to the client browser browsing, can be xml-〉html on the server side of the conversion, but the normal static space does not support the conversion, you can choose to support xmldom ASP or PHP server.
XML is an abbreviation for Extensible Markup language
XML is a markup language similar to HTML
XML is used to describe the data
XML tags are not predefined in XML, you must define your own tags
XML uses a document type definition (DTD) or schema to describe the data
XML is a self-describing language after using a DTD or schema
What are the main differences between XML and HTML?
XML is used to store data.
XML is not an alternative to HTML, and XML and HTML are two languages that are used for different purposes.
XML is designed to describe data, focusing on what the data is and how it is stored.
HTML is designed to display data, with the emphasis on displaying data and how to display it better.
HTML is associated with displaying information, and XML is related to descriptive information.
XML is the language used for data exchange on the network and has a similar format to the HTML language that describes the Web page. The language has the advantages of "data validation with Web browsers" and "Easy data generation", so it is primarily used to exchange and leverage data between enterprises, or more conveniently within the enterprise. First, for the sake of understanding, the following hypothesis is a situation: A book vendor to set up their own site, and send the bookstore catalog and inventory information.
When you manage your books, you need to use table labels, and so on, to provide data such as book titles, release dates, inventory, authors, publishers, and pricing in a list. When you summarize data in this form, if you are a person, you can quickly get to know what you want. However, the computer (or system) does not understand the meaning (attributes) of the data here, even if it can understand the structure of the page or the layout of the data.
However, "XML" is the technology that enables computers to understand these data attributes as well.
If you use XML, such as "How much inventory is there?" and "How many books has the book sold by some writer?" Data can be "automatically" mastered by the computer and be able to "share" the data with the trading object. As a result, publishers will be able to reference this data when formulating future publishing plans, and it would be easier for sales companies to develop effective distribution plans. This will certainly help to reduce personnel costs and improve management efficiency.
Of course, even if you don't use XML, for example, if you can build a canonical database and define a name for each field, such as "title" and "pricing," the computer can understand. But to achieve this on the web, it takes a considerable amount of manpower and cost. At this point, if it is XML, because "you can use a Web browser to confirm the data," so long as you have a computer that can connect to the Internet and XML-enabled browsers, there is no need for special investment.
Using XML, it is also possible to convert data that is difficult to process in a previous database into a database.
XML is described in the same way as HTML, and is described using a string enclosed in parentheses <>. In HTML, information such as layout is defined in parentheses. XML also defines the properties of the data, such as the book mentioned earlier, which is defined by < title >, < author > and < press >. A definition like this can be set freely. As a result, there are even many companies that define XML themselves and use it for data exchange within the company. This high degree of freedom is one of the reasons why XML is greatly concerned.
However, the exchange of data between enterprises is one of the focuses of XML. Therefore, the definition of each company cannot be generalized if it is not normalized. At present, the Microsoft-based standardization Group "biztalk.org" and the Civil society "Rosetta Net" and so on are looking for industries and areas to develop "widely used signs" to reduce the trouble of defining XML.
If the standard of XML can be developed as mentioned above, and widely used, it is not only the exchange of data between enterprises will become simpler, but also the data such as voice and dynamic image data in the past database can be easily converted into a database. This is a huge merit in terms of management, too.