Reference
XML elements
34 elements across 4 formats. Every entry carries a broken document and a fixed one, both run through the validator on each test run — including the 10 where the broken document passes, which the page says outright.
Why these formats and not others
An element page is worth publishing when it can say what the element contains, how many are allowed, what our validator does with it, and show a broken and a fixed document that were actually run. That last part is only possible for the formats whose conformance we check — sitemaps and feeds. The rest of the reference covers the other formats at the document level, and the format pages are where they live.XML sitemap · 10
- <urlset>The root element of every sitemap. Its namespace declaration is what makes the document a sitemap rather than a list of URLs.
- <url>One entry in a sitemap: a required <loc> plus the optional metadata a crawler may or may not use.
- <loc>The URL itself — the only required child of <url>, and the element where ampersands in query strings go wrong.
- <lastmod>When the page last changed. The one piece of sitemap metadata search engines still act on — and only if you keep it honest.
- <changefreq>A hint at how often a page changes, drawn from a fixed list of eight values — and ignored by every major search engine.
- <priority>A number from 0.0 to 1.0 expressing a URL's importance relative to others on the same site — also ignored, and routinely misunderstood.
- <xhtml:link>An hreflang alternate for a URL, declared in the XHTML namespace — the only correct way to express language variants in a sitemap.
- <image:image>An image carried by a page, declared inside its <url> — the extension that survived while its siblings were cut back.
- <news:news>The Google News extension: a publication block and a publication date, on URLs from the last two days only.
- <video:video>A video on a page: thumbnail, title, description and a location, with the strictest required-child list of any sitemap extension.
Sitemap index · 4
- <sitemapindex>The root element of a sitemap index: a list of sitemaps rather than a list of URLs, in the same namespace as an ordinary sitemap.
- <sitemap>One child sitemap in an index: a required <loc> pointing at the sitemap file, and an optional <lastmod> for it.
- <loc>The URL of a child sitemap. Same element name as in a sitemap, different meaning: it points at a file, not at a page.
- <lastmod>When a child sitemap last changed — the element that lets a crawler skip a file it has already seen.
RSS 2.0 · 10
- <rss>The root element of an RSS feed. It carries the version attribute and exactly one <channel>, and nothing else.
- <channel>The feed itself: three required children — title, link and description — and every item beneath them.
- <title>The name of the feed, or of an item. Required on the channel; on an item, required only if there is no description.
- <link>The URL of the site, or of an item — and, in RSS, an element whose text content is the URL rather than an href attribute.
- <description>The feed's summary, or an item's body. Required on the channel, and the element where HTML inside XML becomes a problem.
- <item>One entry in the feed. Every child is optional except that it must have a title or a description.
- <guid>An item's permanent identifier. Readers use it to tell a new item from one already shown — and a feed that changes it republishes everything.
- <pubDate>When an item was published, in RFC 822 — the date format that is not ISO 8601, and is the most common thing wrong in a feed.
- <enclosure>The media file attached to an item — the element podcasting is built on, and the one whose length attribute is routinely wrong.
- <atom:link>An Atom element borrowed into RSS so a feed can name its own URL — the conventional way to declare rel="self".
Atom 1.0 · 10
- <feed>The root element of an Atom document, and the one place the specification names three children as required rather than recommended.
- <id>A permanent, universally unique IRI for the feed or an entry. Required on both, and the element Atom is strictest about.
- <title>The human-readable name of a feed or entry, carrying a type attribute that says how to interpret its content.
- <updated>When a feed or entry last changed meaningfully, as a strict RFC 3339 timestamp — the other half of the date confusion between Atom and RSS.
- <entry>One item in an Atom feed, with the same three required children as the feed itself and an author requirement it can inherit.
- <link>A typed reference from a feed or entry to somewhere else — an empty element whose URL is in href, unlike RSS's <link>.
- <author>A person construct naming who wrote the feed or an entry — required at one level or the other, which is the rule most feeds break.
- <content>The entry's body — text, escaped HTML, inline XHTML, or a src attribute pointing elsewhere entirely.
- <summary>A short description of an entry — optional most of the time, and required exactly when the content is remote or not text.
- <published>When an entry first appeared, as distinct from when it last changed — the element RSS has no equivalent for.
Holding an error message rather than an element name? The parse error reference is keyed by what your parser printed, and the glossary defines the words both of them assume.
Get started
Bring order to the XML your team can't afford to ignore.
Create a free account and get a private workspace to search, validate, diff, and monitor your XML feeds, sitemaps, schemas, and vendor integrations.