albro avatar

Understanding XML By albro

albro

Published: 28 Sept 2023 › Updated: 28 Sept 2023Understanding XML By albro

Understanding XML By albro

Understanding XML

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.



  @ocdb
  @albro
  Reminder
  Don't forget me this weekend!

See another example of XML file structure:




    @albro
    100
    
   I Love Hive Blockchain
   
    200


    @ocdb
    100
    
    @ocdb and @albro are friends.
    
    100000


    @leo.voter
    100
    
    @leo.voter hate @albro!
    
    1000000


    @xeldal
    100
    
    @xeldal love @lbro!
    
    20000


    @mahdiyari
    100
    
    @mahdiyari and @albro are the best friends
    
    95000

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 albroHive account@albro to ocdbHive account@ocdb, saved by XML:



  @ocdb
  @albro
  Reminder
  Don't forget me this weekend!

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:

hiveblock

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 and ) 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 , , 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 tags). Then consider the new version of the hiveblock.xml file, with and added and removed.

Since the file is built in XML format, the old version of the program can still work:


  2023-09-28
  1:00
  @ocdb
  @albro
  Don't forget me this weekend!

New hiveblock

Old 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.

Leave Understanding XML By albro to:

Written by

I'm albro and here I want to talk about programming issues and the path I've taken.

Read more #development posts


Best Posts From albro

We have not curated any of albro's posts yet. But you can encourage our curation team to review posts by visiting them regularly and by referring other readers. Because we give priority to frequently read content.

More Posts From albro