XML - Panoramica

XML sta per Extensible Markup Langoscia. È un linguaggio di markup basato su testo derivato da SGML (Standard Generalized Markup Language).

I tag XML identificano i dati e vengono utilizzati per archiviare e organizzare i dati, invece di specificare come visualizzarli come i tag HTML, che vengono utilizzati per visualizzare i dati. XML non sostituirà l'HTML nel prossimo futuro, ma introduce nuove possibilità adottando molte caratteristiche di successo dell'HTML.

Ci sono tre importanti caratteristiche di XML che lo rendono utile in una varietà di sistemi e soluzioni:

  • XML is extensible - XML ​​ti consente di creare i tuoi tag auto-descrittivi, o linguaggio, che si adattano alla tua applicazione.

  • XML carries the data, does not present it − XML allows you to store the data irrespective of how it will be presented.

  • XML is a public standard − XML was developed by an organization called the World Wide Web Consortium (W3C) and is available as an open standard.

XML Usage

A short list of XML usage says it all −

  • XML can work behind the scene to simplify the creation of HTML documents for large web sites.

  • XML can be used to exchange the information between organizations and systems.

  • XML can be used for offloading and reloading of databases.

  • XML can be used to store and arrange the data, which can customize your data handling needs.

  • XML can easily be merged with style sheets to create almost any desired output.

  • Virtually, any type of data can be expressed as an XML document.

What is Markup?

XML is a markup language that defines set of rules for encoding documents in a format that is both human-readable and machine-readable. So what exactly is a markup language? Markup is information added to a document that enhances its meaning in certain ways, in that it identifies the parts and how they relate to each other. More specifically, a markup language is a set of symbols that can be placed in the text of a document to demarcate and label the parts of that document.

Following example shows how XML markup looks, when embedded in a piece of text −

<message>
   <text>Hello, world!</text>
</message>

This snippet includes the markup symbols, or the tags such as <message>...</message> and <text>... </text>. The tags <message> and </message> mark the start and the end of the XML code fragment. The tags <text> and </text> surround the text Hello, world!.

Is XML a Programming Language?

A programming language consists of grammar rules and its own vocabulary which is used to create computer programs. These programs instruct the computer to perform specific tasks. XML does not qualify to be a programming language as it does not perform any computation or algorithms. It is usually stored in a simple text file and is processed by special software that is capable of interpreting XML.