XML

Extensible Markup Language (XML) is a markup language used for storing structured data. It uses custom tags to define the elements which support a wide range of elements. It was developed because HTML was unable to define new elements hence XML was introduced which was extensible to define custom elements.
It was designed to store and transport data and contain information about the sender, receiver, heading, and message body. It is more focused on what data is rather than how data looks. It is used for representing documents, data, transactions, invoices, etc. 

Example: Implementation of the basic structure of XML code.

XML




<?xml version="1.0" encoding="UTF-8"?>
<message>
    <to>Users</to>
    <from>w3wiki</from>
    <subject>Welcome message</subject>
    <text>Welcome to w3wiki</text>
</message>


Output:

Output of XML code

Features:

  • XML facilitates efficient data exchange.
  • XML is versatile, not bound to specific software or hardware.
  • XML easily integrates with other markup languages.
  • Smooth transitions between platforms are enabled by XML.
  • XML supports Unicode, ensuring compatibility for diverse characters.

Drawbacks:

  • It is verbose in nature and has redundant syntax.
  • It has high storage and transportation cost.
  • It generally has large file sizes due to redundant syntax.

Explain different markup languages other than HTML

Markup languages are computer languages that are used to structure, format, or define relationships between different parts of text documents with the help of symbols or tags inserted in the document. These languages are more readable than usual programming languages with strict syntax. There are several markup languages available but the most popular among them are as follows.

Table of Content

  • HTML
  • XML
  • XHTML
  • SGML

Similar Reads

HTML:

Hypertext Markup Language (HTML) is a markup language used to create and link webpages. It defines the basic structure of a web page and contains meta-data about the page and a series of elements to be displayed on the web page. It uses predefined tags such as

, , etc. to render different elements on the webpage. Each element requires a starting and ending tag with content inside it. A marked-up document written in HTML is displayed by a web browser that interprets different tags and accordingly formats and structures the content of the document before displaying it. It can be written in a plain text editor and can be associated with styling sheets such as CSS (Cascading Style Sheets)  and scripting languages such as JavaScript....

XML:

...

XHTML:

Extensible Markup Language (XML) is a markup language used for storing structured data. It uses custom tags to define the elements which support a wide range of elements. It was developed because HTML was unable to define new elements hence XML was introduced which was extensible to define custom elements. It was designed to store and transport data and contain information about the sender, receiver, heading, and message body. It is more focused on what data is rather than how data looks. It is used for representing documents, data, transactions, invoices, etc....

SGML:

...