Website Buildin...login
Website Building Guide
author:php.cn  update time:2022-04-01 15:26:43

XML Guide


XML - Extensible Markup Language (EXtensible Markup Language)

XML is a cross-platform, software- and hardware-independent tool for transmitting information.

XML document example

##<?xml version="1.0"?>
< note>
<to>Tove</to>
<from> ;Jani</from>
 
<heading>Reminder</heading>
 ​
<body>Don't forget me this weekend!</ body>
##</
note>


What is XML?

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

  • XML is a markup language , very similar to HTML

  • XML is designed to describe data

  • XML tags are not predefined . You need todefine the tag yourself.

  • XML uses Document Type Declaration (DTD) or XML Schema to describe data.

  • XML with a DTD or XML Schema is designed to be self-describing.

  • XML is a W3C standard


XML doesn’t do anything

ML doesn’t do anything . XML creates structures to store and carry information.

The above example of an XML document is a note from Jani to Tove written in XML. Pay attention to the title and body of the email. It also has information about where it comes from. However, this XML document doesn't do anything. Just pure information wrapped in XML markup. Someone must have written a software to send, receive or display it:

MESSAGE

To: Tove
From: Jani

Don't forget me this weekend!



##XML tag Not predefined

XML tags are not predefined, you have to "invent" your own tags.

The tags used to mark HTML documents are predefined. HTML file authors can only use tags defined in HTML standards (such as <P>, <H1>, etc.).

XML allows the author to define his/her own tags and his/her own document structure.

In the above example (like <to> and <from>) tags are not defined in any XML standard. These tags are "invented" by XML document authors.

View an XMLCD catalog

View an XML plant catalog

View an XML food menu

How to learn XML?

Study our complete XML tutorial