XML stands for EXtensible Markup Language.

It’s a text-based markup language derived from Standard Generalized Markup Language (SGML), used for storing and transportation of data.

What is Markup?

XML is a markup language that defines a fixed set of rules for creating documents that are readable by both – humans and machines.

It is a method through which information is added to a document, which helps to identify various parts and its relation with other parts. Its simple definition is – a markup language is a set of symbols that is placed in the text of a document to distinguish and label the components/parts of that document.

Following example shows how to use XML markup language:

<text>Hello, world!!!</text>

Is XML a programming language?

Every programming language consists of its own set of grammar rules and vocabulary which is used to create programs. These programs have instructions for computer to perform specific tasks. Unfortunately, XML does not have such qualifications and due to this, it cannot perform any algorithm or computation. It simply stores data in simple text file and is processed by a software that is capable of interpreting XML.

XML Syntax Rules

  • The XML declaration must begin with “<?xml>” where declaration is case sensitive and “xml” is written in lower case.

  • Value of encoding that you put in the XML declaration will be overridden by HTTP protocol.

  • Always use XML declaration as first statement of the XML document.

Benefits of using XML

The main benefits of using XML is that you can take data from one platform or program like MySQL, convert it into XML, and then share that XML to other platforms or programs. Receiving programs or platforms then convert the XML into a structure which the program or platform then uses. This makes it very easy for two platforms or programs to communicate with each other, which are potentially very different.

There are numerous applications that use XML. Like:

  • File Converters: Numerous applications have been written to convert data or documents into XML standard. E.g.: PDF to XML converter.

  • Cell Phones: XML data is used to display text, images or even to play sounds.

  • VoiceXML: You can listen to any XML document by converting into an audio format.

XML Validation

XML validation can be done in two ways:

  • Validation against XSD (XML Schema Definition)

  • Validation against DTD (Document Type Definition)

Both are used to define XML structure.

This blog is the first part of the three blog series on XML and JSON. The next post will cover JSON in detail and third post in this series will cover XML vs JSON.

Services ZNetLive offer:

Cheap Domain Name

Linux Shared Hosting India

Managed WordPress Hosting India

VPS Hosting India

Dedicated Server India

Feel free to drop in your comments in the comment section.