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.
- 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.
<?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>Namespaces you will meet
RDF/XML syntax
http://www.w3.org/1999/02/22-rdf-syntax-ns#The RDF graph syntax in XML, and the namespace that identifies an RSS 1.0 document — whose root element is <rdf:RDF> rather than <rss>.
Dublin Core (elements 1.1)
http://purl.org/dc/elements/1.1/Fifteen general-purpose metadata terms — creator, date, title, subject, rights and friends — reused inside RSS, RDF and publishing formats alike.
The reserved xml: namespace
http://www.w3.org/XML/1998/namespaceBound to the xml: prefix implicitly and permanently, and the source of xml:lang, xml:space, xml:base and xml:id. Never declare it, never rebind it.
Other formats
- XML sitemap
- Sitemap index
- RSS 2.0
- Atom 1.0
- SOAP envelope
- XML Schema (XSD)
- WSDL
- XSLT stylesheet
- SVG
- OPML
- RDF/XML
- GPX
- KML
- XLIFF
- UBL Invoice
- JUnit XML
- Maven POM
- SAML 2.0
- Property list
- DocBook 5
- JATS article
- MusicXML 4.0
- MathML
- XSL-FO
- OOXML document
- Android manifest
- Android strings
- MSBuild project
- Log4j 2 config
- JaCoCo report
- Checkstyle report
- EPUB package
- TEI document
- ISO 20022 pain.001
- HL7 CDA
- TTML captions
- OpenStreetMap XML
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.