XML technical m...login
XML technical manual
author:php.cn  update time:2022-04-14 15:57:53

Introduction to XML



XML is designed to transmit and store data.

HTML is designed to display data.


Basic knowledge you should master

Before you continue learning, you need to have a basic understanding of the following knowledge:

  • HTML

  • JavaScript

If you would like to learn these projects first, please visit these tutorials on our home page.


What is XML?

  • XML refers to Extensible Markup Language (EXtensible Markup Language).

  • XML is a markup language much like HTML.

  • XML is designed to transmit data, not display data.

  • XML tags are not predefined. You need to define the labels yourself.

  • XML is designed to be self-describing.

  • XML is a W3C recommendation.


Differences between XML and HTML

XML is not a replacement for HTML.

XML and HTML are designed for different purposes:

  • XML is designed to transmit and store data, with the focus being the content of the data.

  • HTML is designed to display data, with the focus being on the appearance of the data.

HTML is designed to display information, while XML is designed to transmit information.


XML doesn't do anything

Maybe this is a little hard to understand, but XML doesn't do anything. XML is designed to structure, store and transmit information.

The following example is a note written by Jani to Tove, stored as XML:

<note>
<to>Tove</to>
< from>Jani</from>
<heading>Reminder</heading>
<body>Don't forget me this weekend!</body>
</note>

The note above is self-descriptive. It contains information about the sender and recipient, as well as headers and the message body.

However, this XML document still doesn't do anything. It's just pure information wrapped in XML tags. We need to write software or programs to transmit, receive and display this document.


Through XML you can invent your own tags

The tags in the above example are not defined in any XML standard (such as <to> and <from>). These tags were invented by the creators of XML documents.

This is because the XML language does not have predefined tags.

The tags used in HTML are predefined. HTML documents can only use tags defined in the HTML standard (such as <p>, <h1>, etc.).

XML allows authors to define their own tags and their own document structure.


XML is not a replacement for HTML

XML is a complement to HTML.

It's important to understand that XML will not replace HTML. In most web applications, XML is used to transmit data, while HTML is used to format and display the data.

The best description of XML is:

XML is an information transmission tool that is independent of software and hardware.


XML is a W3C Recommendation

XML became a W3C Recommendation on February 10, 1998.

To learn more about W3C XML activities, visit our W3C tutorials.


XML is everywhere

Currently, XML plays as important a role in the Web as HTML, which has always been the cornerstone of the Web.

XML is the most commonly used tool for data transfer between various applications.



php.cn