Skip to main content
XMLDir

Search 309 pages — tools, formats, elements, namespaces, directory, comparisons, XPath, datatypes, glossary, parse errors, schema errors, use cases, blog and product.

Atom 1.0

<content>

The entry's body — text, escaped HTML, inline XHTML, or a src attribute pointing elsewhere entirely.

The type attribute decides everything about how content is read: text and html mean escaped character data, xhtml means a real <div> child in the XHTML namespace, and any other media type means base64 or inline XML depending on what it is.

There is also a src form: <content src="…" type="…"/> with no content at all, pointing at the body elsewhere. When src is present, or when type is not text, html or xhtml, the entry must carry a <summary> as well — the one conditional requirement in the format.

What it contains

Nothing — this element holds a value rather than other elements. Its content is text, and the constraints below are what that text has to be.

Attributes

  • typeoptionaltext (default), html, xhtml, or a media type.
  • srcoptionalIRI of the content, when it is not inline. The element is then empty.

Cardinality and constraints

At most one per <entry>.

  • type is text, html, xhtml, or a media type.
  • With type="xhtml" the body is a single <div> in the XHTML namespace, not escaped text.
  • With src, or with a media type, a <summary> becomes required on the entry.

What our validator does

We do not check content: neither the type attribute nor the conditional <summary> requirement is enforced, so an entry with remote content and no summary passes.

We do not catch this one

The content is remote, so RFC 4287 requires a <summary> on this entry and there is none. Our feed checks do not implement that conditional rule, and report nothing for either document.

Broken and fixed

Both documents below are well-formed XML — that is the point of this corpus — and both are run through the validator on every test run. The verdicts here are what it returned, not what we expect it to.

broken
<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
  <id>urn:uuid:60a76c80-d399-11d9-b93c-0003939e0af6</id>
  <title>Example</title>
  <updated>2026-08-10T09:00:00Z</updated>
  <author><name>Ada Lovelace</name></author>
  <entry>
    <id>urn:uuid:1225c695-cfb8-4ebb-aaaa-80da344efa6a</id>
    <title>Hen lays egg</title>
    <updated>2026-08-10T09:00:00Z</updated>
    <content src="https://example.com/egg" type="text/html"/>
  </entry>
</feed>
No issue reported. This defect passes our checks.
fixed
<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
  <id>urn:uuid:60a76c80-d399-11d9-b93c-0003939e0af6</id>
  <title>Example</title>
  <updated>2026-08-10T09:00:00Z</updated>
  <author><name>Ada Lovelace</name></author>
  <entry>
    <id>urn:uuid:1225c695-cfb8-4ebb-aaaa-80da344efa6a</id>
    <title>Hen lays egg</title>
    <updated>2026-08-10T09:00:00Z</updated>
    <summary>A hen laid an egg.</summary>
    <content src="https://example.com/egg" type="text/html"/>
  </entry>
</feed>
No errors. Warnings may remain — a conforming feed can still be missing a self link — but nothing here is wrong.

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.