Skip to main content

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

XML format

XMP metadata

Adobe's metadata standard: RDF/XML embedded inside JPEGs, PDFs and video files, carrying rights, authorship and edit history.

XMP is the metadata packet embedded in most professional image, PDF and video files. It is RDF/XML — which means it inherits RDF's several equivalent serialisations, and two XMP packets that assert exactly the same thing can look nothing alike. A property may be an attribute on rdf:Description or a child element, and a reader that handles only one shape will silently miss half the world's files.

Because it travels inside a binary container, an XMP packet is padded with whitespace so it can be rewritten in place without relaying the file. That padding is not decoration, and a tool that reformats the packet can make it unwritable by the next tool.

Constraints that bite

  • RDF/XML allows a property as either an attribute or a child element. Both are correct and both occur; parse for both.
  • Language alternatives use rdf:Alt with xml:lang, and the first entry is conventionally x-default.
  • The packet is wrapped in <?xpacket?> processing instructions and padded with whitespace for in-place rewriting. Preserve them.
  • The same fact often appears in XMP, EXIF and IPTC in one file, and they disagree. XMP is conventionally authoritative, but nothing enforces it.
  • Namespace prefixes are conventional, not fixed — bind to the URI, never to the prefix.
Root element
<xmpmeta>
Media type
application/rdf+xml
Extensions
.xmp
Namespaces
  • adobe:ns:meta/
  • http://www.w3.org/1999/02/22-rdf-syntax-ns#
XMLDir label

Specification: ISO 16684-1 (XMP)

A minimal valid document

Every example on this site is checked against the same parser the workspace uses, so what you see below is known to be well-formed.

xmp.xml
<?xml version="1.0" encoding="UTF-8"?>
<x:xmpmeta xmlns:x="adobe:ns:meta/">
  <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
           xmlns:dc="http://purl.org/dc/elements/1.1/"
           xmlns:xmp="http://ns.adobe.com/xap/1.0/">
    <rdf:Description rdf:about="" xmp:CreatorTool="Example 1.0">
      <dc:format>image/jpeg</dc:format>
      <dc:title>
        <rdf:Alt>
          <rdf:li xml:lang="x-default">Harbour at dawn</rdf:li>
        </rdf:Alt>
      </dc:title>
      <dc:creator>
        <rdf:Seq><rdf:li>Ada Lovelace</rdf:li></rdf:Seq>
      </dc:creator>
    </rdf:Description>
  </rdf:RDF>
</x:xmpmeta>

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.