Extracting xmp xml from .idml files

Started by jzaz, October 15, 2021, 01:24:02 PM

Previous topic - Next topic

jzaz

Hi. I am maintaining an application which uses exiftool to extract the raw xmp xml from files, using exiftool -xmp -b myfile.jpg. The files typically contain fields with custom namespaces, not "known" to exiftool.

It's working with many different file formats but -xmp -b doesn't appear to extract any xml for the Adobe InDesign files which I have. I know the data is in there because I can list the metadata fields (the custom fields as well as the standard ones) with exiftool -XMP:all myfile.idml. I can also produce an xml file with exiftool -o myfile.xmp myfile.idml but that is missing the custom fields (I understand why).

But is there a reason why exiftool -xmp -b myfile.idml produces no output and can anyone suggest a way I can get xmp xml which includes the custom namespaces/fields out of these idml files?

I've attached a sample myfile.idml which doesn't include any custom fields but which does demonstrate the problem.

Thanks :)

Phil Harvey

ExifTool doesn't extract this as XMP because it is actually an XML file that ExifTool is reading as XMP.  You can use any zip program to extract it.  The IDML file is just a zip archive, and ExifTool is reading the XMP from META-INF/metadata.xml.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

jzaz

Thanks so much Phil. Now it all makes sense.