Introduction to XML
XML is designed to transport and store data.
HTML was designed to display data.
XML stands for eXtensible Markup Language.
Extensible Markup Language (XML) is a markup language that was simplified and modified from Standard Generalized Markup Language (SGML). Its main uses include Extensible Markup Language, Extensible Stylesheet Language (XSL), XBRL, and XPath.

Basic knowledge you should master
Before you continue, you should have a basic understanding of the following:
- HTML
- JavaScript
If you wish to learn these topics first, please visit our Home to access these tutorials.
What is XML?
- XML stands for EXtensible Markup Language.
- XML is a markup language very similar to HTML.
- XML was designed to carry data, not to display data.
- XML tags are not predefined. You must define your own tags.
- XML is designed to be self-descriptive.
- XML is a W3C recommendation.
Differences between XML and HTML
XML is not a replacement for HTML.
XML and HTML were designed for different purposes:
- XML was designed to transport and store data, with a focus on what data is.
- HTML was designed to display data, with a focus on how data looks.
HTML is designed to display information, while XML is designed to transport information.
XML does not do anything
This may be a bit hard to understand, but XML does not do anything. XML was designed to structure, store, and transport information.
The example below is a note from Jani to Tove, stored as XML:
<
note
<
to
Tove
to
<
from
Jani
from
<
heading
Reminder
heading
<
bodyDon't forget me this weekend!
body
note
The note above is self-descriptive. It contains information about the sender and receiver, as well as a heading and a message body.
However, this XML document still does not do anything. It is simply pure information wrapped in XML tags. We need to write software or programs to transmit, receive, and display this document.
With XML you can invent your own tags
The tags in the example above are not defined in any XML standard (such as
This is because the XML language has no predefined tags.
The tags used in HTML are predefined. An HTML document can only use tags defined in the HTML standard (such as
、
etc.).
XML allows creators to define their own tags and their own document structure.
XML is not a replacement for HTML
XML is a complement to HTML.
It is important to understand that XML does not replace HTML. In most web applications, XML is used to transport data, while HTML is used to format and display data.
The best description of XML is:
XML is a software- and hardware-independent tool for transporting information.
XML is a W3C recommendation
XML became a W3C recommendation on February 10, 1998.
For more information about W3C XML activities, please visit our W3C Tutorial。
XML is everywhere
Today, XML plays a role in the Web no less important than HTML, which has always been the cornerstone of the Web.
XML is the most commonly used tool for data transport between various applications.