XML (Extensible Markup Language) is a text format that represents data as a tree of nested elements written with opening and closing tags, optionally carrying attributes. You define your own tag names, which is why it is called extensible.
Why it matters
XML is still everywhere: sitemaps, RSS and Atom feeds, SVG images, Office documents, Android layouts and many enterprise SOAP services. Compared with JSON it is more verbose, but it supports namespaces, schemas for validation and mixed text-and-markup content.
Example
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<url>
<loc>https://example.com/</loc>
<lastmod>2026-10-01</lastmod>
</url>
</urlset>
Every opening tag needs a matching closing tag, and the document has a single root element.
Common mistakes
- Forgetting to escape
&,<and>in text as&,<and>, which makes the file unparseable. - Mixing up XML with HTML; HTML parsers forgive errors, XML parsers do not.
- Parsing untrusted XML without disabling external entities, which can enable XXE attacks.
Related
Get notified when this term updates
Plus occasional practical tips on uptime and monitoring, nothing else. Unsubscribe anytime.
This page is general information written by our editorial team and updated when documentation changes. Servers and providers differ, so test changes safely first. See our editorial policy and disclaimer.