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:
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