The difference between HTML and XML

One, HTML

       HTML (HyperTextMark-upLanguage) i.e. HyperText Markup Language, is the WWW description language.  

Two, XML

       XML i.e. ExtentsibleMarkup Language (Extensible Markup Language), a meta-language is used to define other languages, the predecessor of SGML (Standard Generalized Markup Language). It does not label set (tagset), nor the rules of grammar (grammatical rule), but it has syntax rules (syntax rule). Any XML document on the application and the correct resolution of any kind must be well-formed (well-formed), that is, each open tab must have a matching closing tag shall not contain reverse order of the label, and syntactically in shall comply with the technical specifications. XML documents can be effective (valid), but not necessarily require effective. The so-called valid document refers to document its compliance with its document type definition (DTD) of. If a document compliance with a model (schema), then the document is a valid model (schema valid).

Third, the difference between HTML and XML

    Through the above understanding of HTML and XML, we take a look at what in the end there are differences and relations between them

    html and xml are for operating data or data structures, the structure is substantially the same, but they are obvious differences in the nature. Comprehensive variety of information online are summarized below.

(A), requires different syntax:

1. The case-insensitive in html, strict distinction in xml.

2. In HTML, sometimes strict, if the context clearly show paragraph or list of keys at the end where you can omit an end tag </ p> or </ li> and the like. In XML, it is a strict tree structure must not omit end tags out.

3. In XML, with a single tag without a matching end tag of the element must be a / character as the end. So the parser knows not find the end tag.

4. In XML, attribute values ​​must be dispensed in quotes. In HTML, quotation marks may or may not. 

5. In the HTML, can have no value attribute names. In XML, all attributes must have a corresponding value. 

6. In the XML document, a blank part will not be automatically deleted parser; however html is to filter out spaces.

(B), different markers:

1, html using a native marker; and there is no inherent xml tag.

2, Html tags are predefined; XML tag is free, customizable and scalable.

(C), different roles:

1. html is used to display data; XML is used to describe the data, storage of data, can be used as a medium persistence! Html and display the data together, these are displayed in the page data; XML

And the data is displayed separately. XML was designed to describe the data, which is the focus of the content data. HTML was designed to display data, which is the focus of appearance data.

2. xml is not a replacement for HTML, xml and html are two different uses of language. XML is not to replace HTML; in fact XML can be viewed as a supplement to the HTML. XML and HTML HTML different target design goal is to focus on the display data and appearance data, and XML data describing the design goals and focus on content data.

3. XML is not any behavior. Similar to HTML, XML does nothing. (Common)

4. For best described as XML might be: XML is a cross-platform, and software and hardware-independent tool for processing and transmission of information.

5. XML in the future will be ubiquitous. XML will become the most popular tool for data processing and data transmission.

 

 

Reprinted from: https://www.cnblogs.com/keyi/p/7131391.html

Guess you like

Origin blog.csdn.net/guyan1101/article/details/93737576