What is XML?

According to bestitude.com, XML stands for “Extensible Markup Language”. It is a programming language, more precisely a cross-media page description language. Today, XML is an important standard for processing content in a media-neutral manner and thus making it easier to access this content.

How is XML structured?

With XML, all data can be described in text form, similar to HTML. Here, too, there are markup elements such as tags enclosed in angle brackets or entity references. However, the tags have no fixed meaning, ie you can define your own tags. Only their appearance is stipulated, but not their meaning. A day can either enclose an area or stand alone. In addition, tags can be supplemented with parameters.

The structures are structured hierarchically in XML and displayed in the form of text files, with text and layout being strictly separated from each other.

Example of an XML document:

ᐸ Message ᐳ
ᐸ to ᐳ Paul ᐸ / to ᐳ
ᐸ from ᐳ Hans ᐸ / from ᐳ
ᐸ heading ᐳ Reminder ᐸ / heading ᐳ
ᐸ body ᐳ Don’t forget your hiking boots! ᐸ / body ᐳ
ᐸ / Message ᐳ

The basis for the representation in XML is ASCII or Unicode text. The data can be read by both computers and humans.

How did XML come about?

With its unambiguous identification using tags, HTML offers a simple way of displaying information in the same way on different browsers. But HTML also reaches its limits, for example when it comes to displaying mathematical formulas and performing complex calculations. For these and many other display problems, a new markup language was necessary, with tags that can be expanded as required and yet apply universally – the beginning of XML.

XML was brought into being by the World Wide Web Consortium (W3C). It wanted to create an open information landscape that is understandable for both humans and machines.

XML vs. HTML

In contrast to HTML, XML is not a language for defining content, but only forms the basis for the language definition. That is why the tags in XML have no fixed meaning as in HTML, where, for example, the tag ᐸ p ᐳ stands for a paragraph or the tag ᐸ br / ᐳ for a line break. In addition, the number of structural elements for HTML is limited.

XHTML vs. HTML

XHTML is a language specially developed for the web, which, to put it simply, combines elements of XML and HTML: the markups are based on HTML, the structure is based on XML.

What is XML used for?

Due to the universal description option, XML can be used for all types of data descriptions, data storage and data exchange.

In the meantime a whole XML family has developed. Today a distinction is made between XML languages ​​that are used to describe the following data groups: text, graphics, geodata, multimedia and security.

The following XML languages ​​are also worth mentioning:

»WSDL – XML ​​language for web services
» SyncML – XML ​​language for synchronization and calendar
data »MathML – XML ​​language for mathematical formulas
» GraphML – XML ​​language for exchange of network
data »XBRL – XML ​​language for transferring financial reports

If necessary, new specific XML languages ​​can be developed.

An XML application that is particularly important for website operators is, for example, the sitemap, in which the search engine is informed about which pages are to be read. Checking the sitemap is one of the most important measures in on- page optimization.

Edit XML files – XML ​​editors

As for HTML, there are special editors for editing XML files that are adapted to the XML syntax and thus highlight certain sections of the file in color, such as the tags. In addition, the editors observe the correct structure of the XML document and offer tools to facilitate the editing of the document.

Validity and well-formedness of an XML document

For a data exchange to be successful, the XML document must be valid. Validity means:

  1. At the beginning of the document there is an XML declaration, followed by a document type declaration (DTD). The following content must correspond to the data type specified in this schema.
  2. The XML files are well-formed, ie the file complies with the XML rules. This includes, for example, that all opening and closing brackets are present.

Checking XML – XML ​​Validator

The validity and well-formedness of an XML document can be determined using XML validators, such as Validome. There you either upload the corresponding file or copy the XML code directly into the respective field at the validator.

What is XML