So what is this thing called XML? XML stands for eXtensible Markup Language. Similar to HTML, XML is a markup language (hence the name).
It’s a markup language for storing and transporting data that is both hardware and software independent.
Here’s the part that may be difficult to understand. XML doesn’t do anything.
Here’s a note that is in XML.
<body>Don’t forget to get milk!</body>
This XML has sender and receiver information as well as a message body and even a heading. However, the XML doesn’t do anything. The XML is just information (data) stored in tags.
There must be a piece of software written to receive, send, display or store the information.
What’s the difference between XML and HTML?
Here’s the crucial difference between these two different markup languages. XML is used to carry or store data. HTML is used to display data.
The XML focuses on what the data is while the HTML focuses on how that data is displayed.
While HTML uses predefined tags, XML language does not. If you are familiar with even basic HTML you know some of these predefined tags such as <p> for a new paragraph or <b> which bolds any text that comes after it until a </b> tag is encountered, which ends the bold text.
When using XML the creator or author needs to define the tags being used, as well as the structure of the document itself.
XML is an Extensible Language
The majority of XML applications will continue to function the way they should even when new data is added or even when data is removed.
We’ll use our example above of the simple note that was created in XML format. Let’s say a newer version is created where <date> and <hour> elements are added, and a <heading> is removed.
Both the new and the old versions will still work.
XML is designed to simplify many things concerning the data it stores.
This includes the following:
- Data sharing.
- Data transport.
- Data availability.
- Moreover, any platform changes that might occur.
There are a variety of computer systems, hardware, and software that contain data in formats that aren’t compatible with one another.
Trying to share data via systems that are not compatible can be extremely difficult and time-consuming. A significant amount of the data must be converted, and often, much incompatible data is lost.
The data within XML is stored in understandable text format. This allows for a way to store, transport and share data independent of any software and hardware compatibility issues that might occur.
XML can save web developers hours upon hours of time. Not to mention the genuine risk of losing data permanently.
By using XML, it also becomes a lot easier to upgrade or expand new web browsers, applications, and even operating systems without losing any data.
Not to mention, with XML, that data can be made available to numerous “readers” such as news feeds, computers, people and even voice machines.