Parses an XMP (RDF/XML) metadata packet and flattens it to a { path: value } struct, mirroring what Adobe XMPCore's XMPMetaFactory.parseFromString(...).iterator() yields. Paths use Adobe's canonical shape: simple properties are prefix:localName, array items (rdf:Bag/Seq/Alt) are prefix:localName[N] (1-based), and struct fields are prefix:localName/childPrefix:childName. All rdf:Description blocks (one per schema) are flattened into the same struct. Language-alternative qualifiers (xml:lang) are not emitted as separate pseudo-properties; the rdf:Alt item value is emitted directly.
xmpParse(xmpXml)
→ returns struct
Parse an XMP string and read a property by its canonical path.
xmp = "><rdf:RDF><rdf:Description rdf:about=\"\" xmlns:dc=\"http://purl.org/dc/elements/1.1/\"><dc:creator>Alex Skinner</dc:creator></rdf:Description></rdf:RDF>";
data = XmpParse( xmp );
writeDump( data["dc:creator"] );
Signup for cfbreak to stay updated on the latest news from the ColdFusion / CFML community. One email, every friday.