Invalid XML produced for certain (all) Apple iPhone 14 files.

Started by Mac2, June 14, 2023, 10:30:39 AM

Previous topic - Next topic

Mac2

A user of my software reported that my software no longer displays metadata for iPhone 14 files.
The XML produced by ExifTool (which my software imports) is invalid:

I use ExifTool 12.63 on Windows.

I've downloaded a sample image from here (hard to find, I've used the one sample available from Austin:
https://www.austinmann.com/trek/iphone-14-pro-camera-review-scotland) and let my software process it to run into the problem.

This XML node is the problem:

<Apple:SemanticStyle>
 <rdf:Description et:id='64' et:table='Apple::Main'>
 <et:desc>Semantic Style</et:desc>
 <et:prt rdf:parseType='Resource'>
 <Apple:0>1</Apple:0>
 <Apple:1>0</Apple:1>
 <Apple:2>0</Apple:2>
 <Apple:3>0</Apple:3>
 </et:prt>
 </rdf:Description>
 </Apple:SemanticStyle>

The Microsoft XML parser reports for

[i]<Apple:0>1</Apple:0>[/i]
...
 [i]<Apple:3>1</Apple:3>[/i]

Error The character '0', hexadecimal value 0x30 is illegal at the beginning of an XML name.
Error The character '1', hexadecimal value 0x30 is illegal at the beginning of an XML name.
 Error The character '2', hexadecimal value 0x30 is illegal at the beginning of an XML name.

Error The character '3', hexadecimal value 0x31 is illegal at the beginning of an XML name.

and refuses to load the XML.

Phil Harvey

I've searched through the page you linked and can't find an original jpg sample.  Could you mail one to me (philharvey66 at gmail.com)?  Thanks.

- Phil

Edit: Never mind.  I found a sample elsewhere.   -- I'll get working on this.
...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 ($).

Phil Harvey

ExifTool 12.64 will patch this by adding an underline to the invalid XML names.

Thanks for this report.

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

Mac2

Cool, thank you.
If you search the page for download, you'll find one 45MB DNG sample. I could not find other samples.

greybeard

Quote from: Mac2 on June 14, 2023, 12:12:47 PMCool, thank you.
If you search the page for download, you'll find one 45MB DNG sample. I could not find other samples.

https://www.dropbox.com/s/kl764411n9jxr5c/iPhone14Pro_ProRAW48MP.DNG?dl=1

Phil Harvey

Thanks.  I did find the DNG, but thought that maybe you found a JPEG somewhere since that is better for me.  I found a JPEG that shows this problem here (from an iPhone 14, not iPhone 14 Pro).

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

Mac2

Thank you Phil!
The 12.64 version indeed fixed the problem and the users affected by this problem are now happy again. And so am I!

Have a nice weekend.