XML
Also known as: XML file, .xml, Extensible Markup Language
XML (Extensible Markup Language) is a text-based format that stores structured data inside nested, custom-named tags, such as `<title>…</title>`. It is self-describing and widely used for documents, configuration, RSS feeds, and data exchange between systems.
- Stores data in nested, self-describing tags
- Powers RSS feeds, SVG, and office documents
- More verbose than JSON but supports schemas
How XML works
XML wraps every piece of data in a matching pair of tags you define yourself, so the markup describes its own content. Tags nest to form a tree, and elements can carry attributes for extra metadata.
Many familiar file types are XML underneath — RSS and Atom feeds, office documents inside `.docx` and `.xlsx`, SVG images, and `.plist` settings on Apple platforms all use XML syntax.
XML vs JSON
Compared with JSON, XML is more verbose because each value sits between an opening and closing tag, which makes files larger but also supports comments, attributes, and formal schemas for validation.
JSON tends to win for web APIs where compactness matters, while XML remains common in publishing, documents, and systems that need strict structure.