XML - what is it? Easily explained
Related Videos: XML Tutorial for Beginners | What is XML | Learn XML (May 2024).
Ask yourself what XML is, we have the right answer for you. In this practical tip, we show you what you need XML for, how you have to deal with it and where you encounter it.
XML - a versatile markup language
XML stands for eXtensible Markup Language and arose out of the necessity that HTML has reached its limits.
- XML is a data format. XML is a text-based data format, similar to "JavaScript Object Notation", better known as JSON.
- This means that XML data can be opened and edited in an editor. Computers can also read and write the XML format.
- Like HTML, XML consists of so-called tags, which are enclosed in angle brackets ''.
- In contrast to XML, there is only a fixed set of tags in HTML, such as
, or
- ,
- With XML you can define your own tags. Only what a day should look like is defined, but not what it means.
- An XML tag can stand alone as follows:. Alternatively, a day can also enclose an area. Then there is an opening and a closing day: area
- Tags can be nested. In this way, a hierarchy can be created.
- If required, a day can have one or more parameters. The syntax is as follows:.
- Parameters always consist of a name and a value. The value is enclosed in double quotes and assigned with an equal sign.
- You can see an example of a data structure in XML in the picture.
Use of XML
XML can be used in many ways. Read here what you can do with XML and what advantages and disadvantages XML has.
- Basically, XML can be used to write, save and exchange data.
- The main advantages of XML are its wide distribution and low learning effort. XML can also be easily interpreted by people and machines.
- The only disadvantage of XML is data overhead compared to a binary format. This means that a structure saved in XML format requires more storage space than is absolutely necessary. Accordingly, it can also be processed somewhat more slowly.
- XML is widely used to import and export application data. For example, a customer database can be displayed well in XML format. By nesting tags, you can assign multiple attributes to a customer. A field for the telephone number can also save in a parameter whether the number is a mobile or private number.
- You can see a possibility of data storage via XML for customer management in the picture.
- The first word "eXtensible" already indicates that the language is expandable. You probably use XML every day in technologies such as HTML or RSS.
How to import an XML file into Excel can be read in the next practical tip.