How does XML work?

            How does XML work? To understand it you need to know the basics of XML. XML is a markup language. But it is different from other markup languages ​like HTML. HTML tells the browser how to display the information. So for example the <B> tag is used in HTML, then the browser will display text that has a border.

            Unlike HTML, XML does not tell browsers or other devices how to display information. Rather, it is a way of structuring information for easy use by other applications. Like HTML, XML uses tags, but unlike HTML whose tags have been defined or patented, XML allows developers or people who use XML to create their own tags according to their own wishes. This allows XML users to create tags in different languages. they want.

            If the explanation above is not clear, let’s take an example. Let’s say you have a game to sell and you have a business partner who wants to get information from the stock games available to you, so your business partner can order games from you. You decided to use XML as the right choice. You decide to make a tag according to what you are selling and also understood by your business partners. So you enter all the game data that you sell into an XML document.

There are many tags that you created above, each tag defines the game product you are selling, such as the name of the game, developer, category and price of the game. This will make it easier for your business partners to understand from any information you provide, and automatically understand what you are selling. Information can be obtained in various ways. You can send an XML document and an automated agent can get the information from it or you can create the basis for creating a web service. So XML allows everyone to create their own rules for how the data will be presented.

            Whichever way you start using XML, note that unlike HTML, XML is a language that knows no tolerance. When coding with HTML, the browser will try to interpret what you want to write and display the correct code for what you want to write. While XML, the application will stop if there is an error and cannot make corrections to the wrong code due to an exclusive tag.

This XML document can be combined with HTML for display in a web browser by constructing a table in HTML code and associating the values ​in its columns with the data from the XML elements:

When it appears in the browser it will look like this: