---
title: XML
slug: xml
qid: 
snapshot: enwiki-001374184588
content_hash: 
license: CC BY-SA 4.0
source: https://en.wikipedia.org/w/index.php?oldid=1374184588
tags: [106939032, 111053174, 129775592, 130110808, 20176031, 20313012, 20327918, 20528537, 23118434, 23307735, 23603337, 24623845, 26851624, 28269686, 28537667, 31128803, 34933827, 35755158, 36490552, 42539518, 50872181]
---

# XML

> [!note] Provenance
> Snapshot `enwiki-001374184588` · content root `…`
> Derived from <https://en.wikipedia.org/w/index.php?oldid=1374184588> · Licensed CC BY-SA 4.0

Extensible Markup Language (XML) is a markup language and file format for storing, transmitting, and reconstructing data. It defines a set of rules for encoding documents in a format that is both human-readable and machine-readable. The World Wide Web Consortium's XML 1.0 Specification of 1998 and several other related specifications —all of them free open standards—define XML. The design goals of XML emphasize simplicity, generality, and usability across the Internet. It is a textual data format with strong support via Unicode for different human languages. Although the design of XML focuses on documents, the language is widely used for the representation of arbitrary data structures, such as those used in web services. Several schema systems exist to aid in the definition of XML-based languages, while programmers have developed many application programming interfaces (APIs) to aid the processing of XML data.

Extensible Markup Language (XML) is a markup language and file format for storing, transmitting, and reconstructing data. It defines a set of rules for encoding documents in a format that is both human-readable and machine-readable. The World Wide Web Consortium's XML 1.0 Specification of 1998 and several other related specifications —all of them free open standards—define XML. The design goals of XML emphasize simplicity, generality, and usability across the Internet. It is a textual data format with strong support via Unicode for different human languages. Although the design of XML focuses on documents, the language is widely used for the representation of arbitrary data structures, such as those used in web services. Several schema systems exist to aid in the definition of XML-based languages, while programmers have developed many application programming interfaces (APIs) to aid the processing of XML data. : An attribute is a markup construct consisting of a name–value pair that exists within a start-tag or empty-element tag. An example is &lt;img src="madonna.jpg" alt="Madonna" /> , where the names of the attributes are "src" and "alt", and their values are "madonna.jpg" and "Madonna" respectively. Another example is &lt;step number="3">Connect A to B.&lt;/step> , where the name of the attribute is "number" and its value is "3". An XML attribute can only have a single value and each attribute can appear at most once on each element. In the common situation where a list of multiple values is desired, this must be done by encoding the list into a well-formed XML attribute with some format beyond what XML defines itself. Usually this is either a comma or semi-colon delimited list or, if the individual values are known not to contain spaces, a space-delimited list can be used. An example with space as a delimiter is &lt;div class="inner greeting-box">Welcome!&lt;/div> , where the attribute "class" both has the value "inner greeting-box" and also indicates the two CSS class names "inner" and "greeting-box". : XML documents may begin with an XML declaration that describes some information about themselves. An example is &lt;?xml version="1.0" encoding="UTF-8"?> . данные Tag names cannot contain any of the characters !"#$%&amp;'()*+,/;&lt;=&gt;?@[\]^`{|}~ , nor a space character, and cannot begin with "-", ".", or a numeric digit. A single root element contains all the other elements. The definition of an XML document excludes texts that contain violations of well-formedness rules; they are simply not XML. An XML processor that encounters such a violation is required to report such errors and to cease normal processing. This policy, occasionally referred to as "draconian error handling", stands in notable contrast to the behavior of programs that process HTML, which are designed to produce a reasonable result even in the presence of severe markup errors. XML's policy in this area has been criticized as a violation of Postel's law ("Be conservative in what you send; be liberal in what you accept"). The XML specification defines a valid XML document as a well-formed XML document which also conforms to the rules of a Document Type Definition (DTD).
