XML stands for Extensible Markup Language. It is a markup language much like HTML that uses embedded tags. However, where HTML uses tags to display information, XML uses tags to describe information. XML was designed to describe data, not display it. In other words, XML tags describe content, while HTML tags describe format. XML does not DO anything; it was created to hold and structure information. XML is a human readable archival format that, with the use of XSL stylesheets, can be converted to presentation format. It provides a portable storage method for IGTs, lexicons and metadata.
XML tags are not predefined like HTML tags. It is therefore possible to use user-defined tags as a way of encoding the structure of information in a plain text format. When these tags are used with a logical nesting structure and appropriate namespaces, data can be arranged in a transparent and interoperable format.
Here is an example of a small XML document ("cat.xml"). Note that the document references a namespace to give the tags a logical context.
<?xml version="1.0" encoding="UTF-8"?>
<form formtype="free root" id="2860" lang="Biao Min">
<grammatical-relation relation-term="is a" pos="Noun"/>
<gloss lang="English" value="cat"></gloss>
This file is composed of sets of user-defined XML tags that are embedded within each other.
XML is the most highly recommended format for data storage. However, it is possible to create an XML version of your data without actually writing XML. Data stored in, for instance, an excel spreadsheet can be exported as an XML document. Furthermore, it is important to note that data in any format is better than no data at all. While XML is best practice, XML compatible formats are good practice, and any format is better than not recording the data at all.
In order to support interoperability and maximize intelligibility, it is optimal to define tags in a way that validates with an XML schema or DTD. If this is not possible, it is important to at least be consistent in your use of tags, and to provide a key that explains what each tag means.