XML stands for eXtensible Markup Language. As the name suggests, XML is a markup language. The XML specification was created by the World Wide Web Consortium (W3C), the body that sets standards for the web.
Features/Benefits of XML
XML has been widely adopted since its creation and with good reason. Some of the key features and benefits of XML include:
- Easy data exchange - One of the great things about XML is that it can allow easy sharing of data between different applications - even if these applications are written in different languages and reside on different platforms.
- Self-describing data - When you look at an XML document, it is very easy to figure out what's going on.
- Create your own languages - XML allows you to specify your own markup language for your own specific purpose. Some existing XML based languages include Banking Industry Technology Secretariat (BITS), Bank Internet Payment System (BIPS), Financial Exchange (IFX) and many more.
What Does XML Look Like?
The following example demonstrates what the contents of a typical XML document could look like.
<?xml version="1.0" encoding="UTF-8"?> <tutorials> <tutorial> <name>XML Tutorial</name> <url>http://www.quackit.com/xml/tutorial</url> </tutorial> <tutorial> <name>HTML Tutorial</name> <url>http://www.quackit.com/html/tutorial</url> </tutorial> </tutorials>
I'll be explaining what this is all about in the coming lessons.
Difference Between XML and HTML
If you're familiar with HTML, you might notice that XML looks similar to HTML. Like XML, HTML is also a markup language. In fact, HTML stands for Hypertext Markup Language. Markup languages are used for describing how a document's contents should be interpreted.
HTML includes over 100 pre-defined tags to allow the author to specify how each piece of content should be presented to the end user. For example, if you surround some content with
<b></b> tags, the user agent/browser will render that content using a bold typeface.
XML allows you to create your own tags to describe the data between them. You're not particularly interested in how the data will be presented. Your main focus is ensuring that the data is well organised within descriptive tags (or elements). This is because XML is primarily used for data storage and transfer purposes - not for presentation purposes.