Deutsch

XML (Extensible Markup Language) is a text-based format that describes data in nested elements with self-defined tags. In SEO it appears mostly as the format of XML sitemaps and of feeds.

How is XML built?

The W3C defines XML as a subset of SGML. A document is well-formed when it follows the syntax rules of the specification, for example one root element, correctly nested elements and a matching end tag for each start tag. Documents that are not well-formed are not XML. Unlike HTML, XML has no fixed set of tags. Authors name the elements themselves or use a vocabulary such as the sitemap protocol. The format became a W3C Recommendation in February 1998. The current edition is the fifth edition of XML 1.0 from November 2008.

Where does XML matter in SEO?

Most often in the XML sitemap, which lists a site’s URLs in a defined structure. Google accepts XML sitemaps, RSS or Atom feeds and text files. The sitemap protocol sets these rules:

  • Required elements are urlset, url and loc.
  • The file is UTF-8 encoded and special characters such as & are escaped as &.
  • One file holds at most 50,000 URLs and 50 MB uncompressed. Larger sites split into several files listed in a sitemap index.
  • Submitting a sitemap is a hint and does not guarantee that Google crawls the URLs.

Example

XML
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
  <url>
    <loc>https://www.example.com/glossary/xml/</loc>
    <lastmod>2026-10-06</lastmod>
  </url>
</urlset>

Common mistakes

  • Special characters not escaped. In XML sitemaps, & must be written as &amp;, for example in URLs with parameters.
  • File too large. One sitemap holds at most 50,000 URLs and 50 MB uncompressed. Larger sites split into several files listed in a sitemap index.
  • Document not well-formed. A document that breaks the syntax rules, such as a missing end tag, is not XML according to the W3C specification.

FAQ

What is an XML file? A text file in XML format. It opens in any text editor or browser.

How does XML differ from HTML? HTML has predefined tags and is designed to display content. XML is designed to carry data and uses tags that authors choose.

Sources

  1. Extensible Markup Language (XML) 1.0 (Fifth Edition) – W3Cw3.org
  2. Sitemaps XML format – sitemaps.orgsitemaps.org
  3. Build and submit a sitemap – Google Search Centraldevelopers.google.com
  4. XML – Wikipedia (secondary)en.wikipedia.org

Last updated: