XML stands for Extensible Markup Language that is similar to HTML but different in using tags for defining objects. The whole idea behind creation of XML file format was to store and transport data without being dependent on software or hardware tools. Its popularity is due to it being both human as well as machine readable. This enables it to create common data protocols in the form of objects to be stored and shared over network such as World Wide Web (WWW). The “X” in XML is for extensible which implies that the language can be extended to any number of symbols as per user requirements. It is for these features that many standard file formats make use of it such as Microsoft Open XML, LibreOffice OpenDocument, XHTML and SVG.
XML File Format
The XML file format is based on the XML Document Object Model (DOM) that is a programming API for HTML and XML documents. The XML DOM defines a standard method to access and manipulate the XML document elements. It makes a tree-structure view of an XML document that can be used to access all elements through the DOM tree. Existing elements can be modified/deleted as well as new elements can be created in the XML tree. Each element of an XML document is called a node. The XML DOM is as shown in the following image.
Universal approach of XML
The power of XML makes it a universal language for data communication over the network by making data transport and platform changes simplified. This also makes sure exchange data between incompatible systems possible by storing data in plain text format. HTML is for data representation over the web, whereas XML is for exchange of data. The markup tag pairs used inside XML define the key elements of the structure to be utilized by reading applications.
The following is a simplified example of a CD catalog where each record contains information about CDs such as artist, country, company, price and year of production.