Reference
XML elements
49 elements across 6 formats. Every entry carries a broken document and a fixed one, both run through the validator on each test run — including 10 documented gaps where the broken document still passes
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, feeds, selected SOAP rules, and selected schema-document rules. The rest of the reference covers 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. Image, news and video extensions go inside it.
- <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. A news sitemap is time-bounded, listing only articles from the last two days.
- <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 — not when its pages did. Kept accurate, it lets a crawler skip a file it has already seen, for free.
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 — with every item beneath them. Everything else the format defines is optional.
- <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 an item must carry a title or a description, so even a link is not guaranteed.
- <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 — text, html or xhtml — that changes how its content must be interpreted.
- <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. The type attribute decides which one you have.
- <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. Only updated is required, which is why so many Atom feeds carry no publication date.
SOAP envelope · 5
- <env:Envelope>The SOAP 1.2 document element: an optional Header followed by one required Body. Its namespace URI, not its prefix, selects the SOAP version.
- <env:Header>The optional SOAP container for routing, security, tracing and other processing metadata, where mustUnderstand and role say who must handle each block.
- <env:Body>The required SOAP container for an application payload or a single Fault. Its payload children come from an application vocabulary, not the SOAP namespace.
- <env:Fault>SOAP 1.2's structured error payload, and not an arbitrary error object: Code and Reason are required, then optional Node, Role and Detail, in that order.
- <env:Detail>The optional Fault child for application-specific error data — a rejected identifier, a validation report — that does not belong in the SOAP fault code.
XML Schema (XSD) · 10
- <xs:schema>The XML Schema document element, where namespaces, global declarations, imports and defaults are assembled, and where targetNamespace names the vocabulary.
- <xs:element>Declares an element's name, type, occurrence range, defaulting and whether an explicit xsi:nil is allowed. Global declarations may also be instance roots.
- <xs:complexType>Defines structured element content: child elements, attributes, mixed text and derivation from another type. Named ones are reusable by QName.
- <xs:simpleType>Defines an atomic, list, or union value without child elements or attributes, usually by restricting a datatype.
- <xs:sequence>A model group requiring child particles to occur in declared order, subject to each occurrence range. Optional children stay ordered against the rest.
- <xs:choice>A model group that selects one of its child particles each time the group occurs. It expresses alternatives, not children in any order.
- <xs:attribute>Declares a simple-typed XML attribute and whether it is optional, required, fixed or defaulted. Attribute content is always simple, never structured.
- <xs:restriction>Derives a narrower type from a base by applying compatible facets or restricting a content model. Every accepted value stays valid in the base type.
- <xs:import>Makes schema components from a different target namespace available to the importing schema. schemaLocation is only a hint, not a guaranteed fetch.
- <xs:include>Combines another schema document for the same target namespace into the current schema set — or adopts a no-namespace one by chameleon inclusion.
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.