Other meanings of XML
Markup language and file format
XML (Extensible Markup Language) is a text-based markup language and file format for representing structured information with user-defined tags. It separates data from presentation, supports hierarchical documents, and is designed to be readable by both people and software. XML became a W3C Recommendation in 1998 and remains a foundation for configuration files, document interchange, publishing, and web-service protocols.1
XML represents information as a tree of elements, attributes, text, comments, and processing instructions. An element begins with a start-tag such as <book> and normally ends with a matching end-tag; nested elements express relationships between pieces of data. A document must have one root element, tags are case-sensitive, and special characters such as & and < are written using character references when they would otherwise be interpreted as markup.1
A document is well-formed when it follows XML's syntactic rules. It may also be valid against a declared grammar, such as a document type definition or XML Schema. XML itself does not prescribe a fixed vocabulary: the application or community defines names such as title, price, or พ according to its needs.
XML was developed at the World Wide Web Consortium as a streamlined descendant of SGML, intended to retain extensibility while being easier to implement and exchange on the Web.1 Its design favors explicit boundaries, predictable parsing, and interoperability over compactness. Unlike HTML, XML does not come with a universal set of presentation-oriented tags; unlike a database, it is not principally a storage engine or query system.
Character data is based on the Unicode standard, allowing documents to represent scripts used around the world, subject to XML's permitted-character rules.2 XML processors generally distinguish parsing from application behavior: a parser checks syntax and exposes a tree or event stream, while a separate application decides how the information should be displayed, stored, transformed, or acted upon.
XML becomes more useful in shared systems when vocabularies are constrained and names are disambiguated. XML Schema can describe permitted elements, attributes, datatypes, ordering, and cardinality, enabling validation beyond basic well-formedness.3 Namespaces allow independently developed vocabularies to coexist by associating names with URI-based namespace identifiers; the prefix itself is only a local shorthand, not the identity of the vocabulary.
Several companion technologies process XML without changing its core syntax. XPath selects nodes and values in an XML tree, while XSLT transforms XML into other XML, HTML, text, or related representations.4 APIs such as the Document Object Model expose a navigable tree, whereas streaming parsers can handle large documents with lower memory use.
XML's ecosystem includes deliberately specialized features that are easy to overlook. XML 1.0 permits internal and external entities, but external entities can create security risks such as XML external entity attacks when untrusted input is parsed without appropriate restrictions.5 Namespaces also complicate seemingly simple tasks: two elements with the same visible prefix may refer to different namespaces, while different prefixes may refer to the same one.
XML is used well beyond ordinary web pages. Formats including SVG, MathML, RSS, SOAP, and many publishing and geospatial standards use XML-based vocabularies. Internet media types distinguish generic XML documents from specialized XML applications, commonly using application/xml or a registered subtype.6 XML can therefore serve as a document format, a protocol envelope, or a machine-readable interchange layer, even when end users never see the underlying markup.
XML is a family of specifications centered on the XML 1.0 syntax; particular applications may impose additional rules through schemas, profiles, or protocol standards.
Help improve the encyclopedia. Reports go straight to the site manager.