XML

Data

XML, or Extensible Markup Language, is a text based format used to represent and exchange structured data. It organizes information using named tags arranged in a hierarchy, making both the data and its structure explicit.

XML was widely used for APIs, configuration files, document formats, and data exchange between systems.

Unlike JSON, XML supports features such as attributes, namespaces, and formal schemas. It remains common in older enterprise systems, document formats, and some industry standards, although many modern APIs now prefer JSON because it is usually more compact and simpler to work with.

How it Works

An XML document surrounds pieces of data with opening and closing tags. Tags can contain text, attributes, or other nested tags, allowing complex information to be represented in a structured way. Programs use XML parsers to read the document and convert its contents into data they can work with.

XML can also be validated against a schema that defines which elements are allowed and how they should be structured. Although XML is more verbose than JSON, its strict structure and extensive tooling still make it useful in systems where detailed data definitions are important.

<user>
  <name>Alex</name>
  <role>Admin</role>
</user>

See More