Article From:https://www.cnblogs.com/hanfanfan/p/9734048.html

【Introduction]

     What are the connections and differences between learning HTML (HyperText Markup Language) a while ago and touching XML (Extensible Markup Language) recently? Now let’s make it heavier.New understanding.

【What is HTML?

     htmlCalled hypertext markup language, is a descriptive language, Using HTML can create information pages that can be transmitted on the internet, is the main language of web documents, it is composed of many tags, with simplicity, platform-independent two major points.

     htmlIt is a text describing the appearance and content of a web page. We usually see all kinds of web pages, which are the result of browser analysis of HTML files.

    Right-click on the browser’s Web page select View Source File or View Page Source Code, and the HTML file appears. Here’s the example of Firefox:

 

   For more information about html, please go to: http://blog.csdn.net/zt15732625878/article/details/53364703

【What is XML?

    xml Extensible Markup Language (XML) is a cross-platform, content-dependent technology in the Internet environment. It is a powerful tool for processing structured document information. It meets the needs of Web content publishing and exchanging, and is suitable as a common platform for storage and sharing.

     XML markup language can be used to share data or data structures in any programming language environment. For example, we write some data or data structures in a programming language on a computer platform and then process them in an XML markup language, so that others can do other calculations.These data or data structures are accessed on the machine platform and can even be manipulated by other programming languages. This is the value of XML markup language as a data exchange language.

    xmlIt can be understood as a car without engine. XML puts all the parts together according to certain rules, and waits for the compiler to start the car. Much of the current use is the definition of configuration and data structure.

【htmlThe same point as XML.

    htmlBoth XML and markup language are based on text editing and modification.

    They are all used for operating systems or data structures, which are roughly the same in structure.

    They can be accessed through DOM.

    You can change the appearance through CSS.

【htmlDifferent from XML]

   

Comparison content
htmlxml
design goalDisplaying data, how to better display data, focuses on data appearance.Describing data, what is data and how to store data, the focus is data content.
grammarNesting, matching and so on are not required.
Case insensitive
Quotes are available but not available.
You can have an attribute name without value.
Filtering blanks;
Strict requirements for nesting, matching, and following the tree structure of DTD;
Case sensitive;
Attribute values must be stored in quotation marks.
All attributes must have corresponding values.
The blank part will not be deleted automatically by the parser.
xmlStricter than HTML syntax.
Relationship between data and displayIntegration of content description and display modeSeparation of content description and display mode
LabelPredefinitionFree, custom and extensible
Readability and maintainabilityDifficult to read and maintainClear structure, easy to read and maintain.
Structure descriptionDeep structure description is not supported.The nesting of file structure can be complex to any degree.
Relationship with databaseThere is no direct connection.It can correspond and transform with relational and hierarchical databases.
HyperlinkSingle file, bookmark linkYou can define two-way links, multi-target links, and extended links.

 

【xmlAdvantage]

  •  xmlThe content and structure of documents are completely separated.

     In an XML document, the display style of the data is separated from the document and put into the relevant style sheet file. In this way, if you want to change the form of the data, you don’t need to change the data itself, just change the stylesheet file that controls the display of the data. XML can ensure the same network.The data information of the site can be displayed successfully on different devices.

  •  Easy cross platform application

      xmlDocuments are text-based, so it is easy to be read by people and machines, but also very easy to use, plain text files can easily cross the firewall, facilitate the exchange of information between different devices and different systems.

  •  Support information interaction between different languages and languages.

      xmlSo the Unicode standard is a mixed text symbol coding system that supports all the major languages in the world. XML technology not only enables information to interact between different computer systems, but also cross-lingual and cross-cultural communication.

  •  Convenient retrieval of information

       Because XML describes the meaning of data by tagging its content and separating the display format of data, the search of XML document data can be carried out easily and efficiently. In this case, the search engine doesn’t have to go through the entire document again, just look for the tagged content..

  •  Extensibility

               xml Allows organizations or resumes to fit their own set of tags or tag libraries, and these tag sets can be quickly put into use on the Internet. Typical markup languages are CML, MathML, VML, and wireless communication markup.Language WML and so on.

  •  Object oriented programming development

      xmlDocuments are very easy to read, and so are machines. XML document data logical structure is a tree-like hierarchy, each element of the document can be mapped to an object, but also can have the corresponding attributes and methods, so it is very suitable to use object-oriented programming approach to develop officeThe application of these XML documents.

【Small knot]

    xmlInstead of replacing html, it is a complement to html, a language that works with html. Based on these advantages, XML will become a common tool for all data processing and data transmission in the future.

——————— This article is from Dabai Fast 8’s CSDN blog. The full text address is https://blog.csdn.net/zt15732625878/article/details/54629596?Utm_source.=copy

Leave a Reply

Your email address will not be published. Required fields are marked *