ENES

XML

A text format that wraps data in named tags, so both people and programs can read it.

An XML snippet describing a book with nested title and author tags, next to the same data drawn as a small tree

XML (Extensible Markup Language) is a way to write structured data as plain text, using tags in angle brackets. Each piece of information sits between an opening tag and a closing tag with a name you choose: a title tag holding "Dune", inside a book tag, inside a library tag. The closing tag repeats the name with a slash. Because tags can be nested, XML can describe almost any shape of data as a tree.

It was standardized by the W3C in 1998 and became the common language for exchanging data between companies and systems. It is still everywhere, often out of sight: Word and Excel files (.docx, .xlsx) are zipped folders of XML, RSS feeds and sitemaps are XML, SVG images like the one on this page are XML, and many banks, governments and electronic invoice systems exchange XML documents.

For new web APIs, JSON has mostly taken its place, because it is shorter and maps directly to the objects programmers use. XML is more verbose, but it brings tools JSON lacks out of the box, such as schemas that strictly validate a document and attributes inside tags. That rigor is why it survives in formal, long-lived document exchanges.

Keep in mind

Go deeper

Related terms

More in Data