Class XmpMetadataReader
- Namespace
- LMKit.Inspection
- Assembly
- LM-Kit.NET.dll
Flattens an XMP metadata packet (RDF/XML, ISO 16684-1) into prefix-qualified
name/value properties: dc:title, pdf:Producer, xmp:CreateDate,
photoshop:AuthorsPosition, plus any custom namespaces the packet declares.
This is generic file-metadata extraction - the same category as reading a PDF
/Info dictionary or an EXIF block - usable on any packet source: a PDF metadata
stream, an image sidecar, or the raw packet a container format embeds.
public static class XmpMetadataReader
- Inheritance
-
XmpMetadataReader
- Inherited Members
Remarks
Both RDF property forms are read: the shorthand form (properties carried as
attributes of rdf:Description) and the element form (one child element per
property). Array containers (rdf:Alt / rdf:Bag / rdf:Seq)
join their items with ", "; nested structures join their leaf values.
Every emitted value is a single line: whitespace runs (newlines, indentation)
collapse to one space. PDF/A extension-schema machinery
(pdfaExtension:schemas and the pdfaSchema / pdfaProperty /
pdfaType / pdfaField structs inside it) describes the packet's own
vocabulary rather than the document, so it is never emitted; pdfaid:*
(the conformance identifier) is a real fact and is kept.
The parse is XXE-safe (DTDs prohibited, no resolver) and never throws on
content: absent, malformed, or fact-free input yields an empty list.
Methods
- Parse(string)
Parses an XMP packet into its flattened properties.