Spying on the secrets between HTML and XML

Source: Internet
Author: User
Tags html tags php server valid client
Xml

Spying on the secrets between HTML and XML

  What is HTML

The whole of the HTML is hypertext Markup Language, Chinese is also the Hypertext Link Markup Language. HTML (Hypertextmark-uplanguage), the Hypertext Markup Language, is the description language of www. The purpose of designing an HTML language is to be able to easily link text or graphics stored in one computer to text or graphics on another computer, to form an organic whole, without having to consider whether the specific information is on the current computer or on other computers on the network. We simply use the mouse to click an icon in a document, and the Internet immediately goes to the content associated with this icon, which may be stored on another computer on the network. HTML text is a descriptive text consisting of HTML commands that can describe text, graphics, animations, sounds, tables, links, and so on. The structure of HTML consists of a head, a body, two parts of the head, which describes the information required by the browser, and the body contains the specific content to be described. In addition, HTML is the common language of the network, a simple, universal, full markup language. It allows web makers to create complex pages of text and images that can be browsed by any other person on the web, regardless of the type of computer or browser used.

  What is XML

XML, the 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 syntax rules (grammatical rule), but it has syntactic rules (syntax rule). Any XML document for any type of application and correct parsing must be well-formed (well-formed), that is, each open tag must have a matching end tag, should not contain an inverted label, and the statement composition should conform to the requirements of the technical specifications. XML documents can be valid (valid), but not necessarily valid. A valid document is a document that conforms to its document type definition (DTD). If a document conforms to the rules of a schema, the document is schema-efficient (schema valid).

  The relationship between HTML and XML

1, in fact, there is no very inevitable link between HTML and XML, XML is not to replace HTML, in fact, XML can be viewed as a supplement to HTML.

2, XML and HTML are different goals: 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 carry out any operations. 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 that the order is delivered, and others must write code to actually perform these operations on the XML-formatted data. Unlike HTML, XML markup is defined by the author of the schema or document, and is unrestricted. HTML tags are predefined; 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 predefined; HTML authors can only use tags that are supported by the current HTML standard.

  Some of the common problems

Q: What is the advantage of XML versus HTML?

A: In fact, there is no comparability between XML and HTML, although there is a certain relationship between them, but their respective functions and objectives (emphasis) is not the same, the application of different occasions, one thing to mention is that XML relative to the standard of HTML is more strong.

Q: HTML can support static space, can XML also?

A: Yes, just make sure the client browser version is no less than 6.0

Q: I would like to do a website, what kind of language to choose?

A: For large web sites, due to a large number of updates, it is not appropriate to do with HTML, because XML support dynamic update, can be used, but not the best choice, and for small web sites, in order to improve the speed of page response, the proposed use of 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 ordinary static space does not support this conversion, you can choose to support xmldom ASP or PHP server.



Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.