ExifTool Forum

ExifTool => Bug Reports / Feature Requests => Topic started by: tistre on March 10, 2020, 06:16:57 AM

Title: exiftool -X returns invalid XML, w/ "XMP format error (no closing tag)" warning
Post by: tistre on March 10, 2020, 06:16:57 AM
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!
Title: Re: exiftool -X returns invalid XML, w/ "XMP format error (no closing tag)" warning
Post by: Phil Harvey on March 10, 2020, 07:16:02 AM
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
Title: Re: exiftool -X returns invalid XML, w/ "XMP format error (no closing tag)" warning
Post by: tistre on March 12, 2020, 05:00:56 AM
Many thanks for the quick response and the fix, Phil!

Best,
Tim