XML

contributed by Mushtaq Ahmad
Extensible Markup Language (XML) is a markup language which allows users to structure, describe, and interchange data on the Internet in clearly defined way. Markup can be used to give sense to data.

Why XML?
XML has revolutionized the web and numerous software applications. Why is XML so important and how could a simple markup language have such an impact. There are various different reasons and the most important is that it eliminates many of the problems associated with exchange of information.

Almost every programmer has to deal with reading and writing files. This involves creating a new file format or learning the syntax of an existing file format. Initially it seems easy but the devil lives in the details. To ensure smooth functionality, input must be meticulously checked to make sure not undesirable characters are inserted. Different programs claiming to use a certain format may not work exactly the same. Generally the differences are subtle and lead to bugs which are difficult to find. The file formats are not robust. Minor changes in format can wreak havoc. There are compatibility problems between different systems.

XML overcome all these problems by enforcing the concept of well-formedness, requiring proper nesting, and allowing validity checks. More importantly, XML is extensible, robust and easy to use.

XML is extensible
XML is extensible in the sense that it allows users to define tags and attributes to describe their data.

XML is robust
XML is robust because it every piece of data is clearly described and validated. Order of the data is not important. Order of elements, and validation criteria can be changed without breaking anything.

XML is easy to use
Novice programmers are often shocked to hear that XML is easy to use. The syntax of XML seems more complicated than say csv files. What they don't realize is that they would almost never have to deal with XML files. Every major language offers XML parsers which are very easy to use. The programmer only needs to learn to use these parsers and he could easily work with every XML file.