
The XML expression consists of the initial letters of the eXtensible Markup Language words. XML is designed to store and transfer data. XML is designed to be both human and machine readable.
< ?xml version="1.0" encoding="UTF-8"? >
< hiveblock>
< to>@ocdb< /to>
< from>@albro< /from>
< heading>Reminder< /heading>
< body>Don't forget me this weekend!< /body>
< /hiveblock>
See another example of XML file structure:
< ?xml version="1.0" encoding="UTF-8"? >
< hive_blockchain>
< user>
< name>@albro< /name>
< power>100< /price>
< description>
I Love Hive Blockchain
< /description>
< hp>200< /hp>
< /user>
< name>@ocdb< /name>
< power>100
< description>
@ocdb and @albro are friends.
< /description>
< hp>100000< /hp>
< /user>
< user>
< name>@leo.voter< /name>
< power>100< /power>
< description>
@leo.voter hate @albro!
< /description>
< hp>1000000< /hp>
< /user>
< user>
< name>@xeldal< /name>
< power>100< /power>
< description>
@xeldal love @lbro!
< /description>
< hp>20000< /hp>
< /user>
< user>
< name>@mahdiyari< /name>
< power>100< /power>
< description>
@mahdiyari and @albro are the best friends
< /description>
< hp>95000< /hp>
< /user>
< /hive_blockchain>
Why do we learn XML?
XML plays an important role in many IT systems. XML is often used for data distributed on the Internet and A deep learning of XML is very important for all types of software developers.
What is XML?
In response to the question of what XML is, I must say that XML is a tool independent of software and hardware to store and transfer information.
- XML is derived from the words eXtensible Markup Language.
- XML markup language is similar to HTML.
- XML is designed to work with data (store and transfer).
- XML is designed to be self-descriptive.
- XML is recommended by the W3C.
XML does nothing
This may be a little hard to understand, but XML does nothing. The following hiveblock is a note from @albro to @ocdb, saved by XML:
< ?xml version="1.0" encoding="UTF-8"? >
< hiveblock>
< to>@ocdb< /to>
< from>@albro< /from>
< heading>Reminder< /heading>
< body>Don't forget me this weekend!< /body>
< /hiveblock>
The XML file above is quite a self-describing file :
- Contains sender information.
- Contains recipient information.
- The section has a heading.
- It also has a section as the body of the message.
But still the XML file above has not done anything. XML just puts information in tags. Now someone has to build a software to send, receive, store or display it. What should be seen as a hiveblock
in the XML file above is shown in the image below:

Differences between XML and HTML
XML and HTML are designed for different purposes:
- XML is designed to transfer data by focusing on what the data is.
- HTML is designed to display data with a focus on how the data will be viewed.
- XML tags are not predefined like HTML tags.
XML does not use predefined tags
The XML language has no predefined tags. The tags that were in the XML code of the above example (such as < to>
and < from>
) are not standard tags defined in XML. These tags are "created" by the author of the XML file. HTML works with predefined tags such as < p>
, < h1>
, < table>
and... In XML, the author of the file creates both the tags and the structure of the XML document.
XML is extensible
Most XML programs work as expected unless new data is added (or deleted). Imagine an XML application designed to display the original hiveblock.xml
(including the < to>
< from>
< heading>
< body>
tags). Then consider the new version of the hiveblock.xml
file, with < date>
and < hour>
added and < heading>
removed.
Since the file is built in XML format, the old version of the program can still work:
< hiveblock>
< date>2023-09-28< /date>
< hour>1:00< /hour>
< to>@ocdb< /to>
< from>@albro< /from>
< body>Don't forget me this weekend!< /body>
< /hiveblock>


XML simplifies things:
- XML simplifies data sharing.
- XML simplifies data transfer.
- XML simplifies changing platforms.
- XML simplifies data accessibility.
Many computer systems contain information in incompatible formats with other formats. Data exchange between incompatible systems (or upgraded systems) is a time-consuming task for web developers. Huge amounts of data must be converted, and inconsistent or incompatible data is often lost.
XML stores data in raw text and this method is a software and hardware independent way to store, exchange and share information. XML also makes it possible to expand or upgrade to new operating systems, new applications, or new browsers without losing data. With XML, information can be accessible to all kinds of users, including humans, computers, audio devices, news reader systems, etc.