exiftool -X returns invalid XML, w/ "XMP format error (no closing tag)" warning

Started by tistre, March 10, 2020, 06:16:57 AM

Previous topic - Next topic

tistre

Hi, when I run "exiftool -X" on the attached file (on macOS, current ExifTool version 11.91, happened with older versions too):

exiftool -X invalid-xml-xmp-format-error.jpg

... the result is invalid XML because an attribute name contains a slash; xmllint says:

-:14: parser error : Specification mandates value for attribute XMP-www.w3.org
  xmlns:XMP-www.w3.org/1999/='http://ns.exiftool.ca/XMP/XMP-www.w3.org/1999//1.0
                      ^
-:14: parser error : attributes construct error
  xmlns:XMP-www.w3.org/1999/='http://ns.exiftool.ca/XMP/XMP-www.w3.org/1999//1.0
                      ^


Maybe this is related to these warnings contained in the XML:

<ExifTool:Warning>XMP format error (no closing tag for photoshop:DateCrateCreated)</ExifTool:Warning>
<ExifTool:Warning>XMP format error (no closing tag for rd:d5c36209-0e14-1f:about)</ExifTool:Warning>


Thank you for looking into this!

Phil Harvey

The XMP in this file is horribly scrambled.

I'll add a patch in ExifTool to protect against reading garbled XMP namespaces.

Thanks for this report, and for the sample test file.

- 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 ($).

tistre