XML

XML (Extensible Markup Language) is a markup language used to encode data.

XML is a language from which languages are made. A body of rules for how an XML document for specific purpose may be constructed is often called a "language" or a "format" in its own right. These rules may be specified in several different ways, the most common being Document Type Definition (DTD) and Schema. A document which follows the syntactic rules of XML is considered "well-formed." A document which is well-formed and also conforms to its DTD or schema declarations is considered "valid."

A Document Type Definition may be included in an XML document or be referenced by a Document Type Declaration, or both approaches may be combined. An external reference to a DTD is provided by a Document Type Declaration, which confusingly has the same initials.

A Schema, unlike a DTD, is itself written in XML. A document can have a Schema for each of its namespaces. DTDs have been largely superseded by Schemas because of the former's limitation of one DTD per document and the latter's greater capacity for describing rules and namespace support.

XML documents refer to both Schemas and DTDs by a URI. It is crucial to remember that this reference is a Universal Resource Identifier, nor a Universal Resource Locator (URL). There is no requirement that the URI point to a resource on the Internet, or even that such a resource exist. This is a potential preservation risk with XML documents, as they may outlive the DTD and Schema documents that characterize them, or the documents may move and be difficult to locate.

There are variants of HTML which are expressed in XML-compliant syntax (which, for instance, requires the tags to be consistently lowercase, and elements with no closing tag have a slash before the right angle bracket at the end of the tag, like &lt;BR /&gt; instead of &lt;BR&gt;), and these are known as XHTML. This format may be served under the XML or HTML MIME types, and browsers might treat them differently in these cases.

While XML is a text-based format, there are also binary XML representations.

Specifications

 * XML 1.0
 * XML 1.0, Fifth Edition (2008-11-26)
 * XML 1.0, Fourth Edition (2006-09-29)
 * XML 1.0, Third Edition (2004-02-04)
 * XML 1.0, Second Edition (2000-10-06)
 * XML 1.0, First Edition (1998-02-10)
 * XML 1.1
 * XML 1.1, Second Edition (2006-09-29)
 * XML 1.1, First Edition (2004-04-15)

Software

 * LT-XML 2 XML toolkit
 * BaseX XML database engine