XML Guide
XML - Extensible Markup Language
XML is a cross-platform tool for transmitting information that is independent of software and hardware.
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 stands for Extensible Markup Language
- XML is a markup language similar to HTML
- XML is designed to describe data
- XML tags are not predefined. You need to define your own tags.
- XML uses Document Type Definition (DTD) or XML Schema to describe data.
- XML with DTD or XML Schema is designed to be self-descriptive.
- XML is a W3C standard
XML Does Not Do Anything
XML does nothing. It creates structure, stores, and carries information.
The example XML document above is a note written from Jani to Tove. It includes the heading and the body of the message. It also contains information about the sender. However, this XML document does not perform any actions. It is purely information wrapped in XML tags. A software application must be written to send, receive, or display it:
| MESSAGE To: Tove From: Jani Don't forget me this weekend! |
XML Tags Are Not Predefined
XML tags are not predefined; you must "invent" your own tags.
The tags used to mark up HTML documents are predefined. HTML document authors 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.
In the example above, tags like <to>
and <from>
are not defined in any XML standard. These tags are "invented" by the XML document author.