Author Topic: Invalid character in XML output  (Read 262 times)

Mac2

  • Sr. Member
  • ****
  • Posts: 248
Invalid character in XML output
« on: April 09, 2020, 01:38:38 PM »
Hi,

it seems ExifTool emits invalid characters under certain conditions.
I have a MP4 video file and when I run ExifTool with my usual arguments (as I do for many years in IMatch), the XML parser rejects the output with:

Error Character '#', hexadecimal value 0x23 is illegal in an XML name. (MSXML parser on Windows).

This starts at the namespace declaration at the very beginning of the ExifTool XML output:

xmlns:Track#='http://ns.exiftool.ca/QuickTime/Track#/1.0/'

and then repeats many times for all values for the Track# namespace.

The # is not allowed for names in XML.

Phil Harvey

  • ExifTool Author
  • Administrator
  • ExifTool Freak
  • *****
  • Posts: 16537
    • ExifTool Home Page
Re: Invalid character in XML output
« Reply #1 on: April 09, 2020, 02:58:59 PM »
Thanks.  I'll look into this
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

Phil Harvey

  • ExifTool Author
  • Administrator
  • ExifTool Freak
  • *****
  • Posts: 16537
    • ExifTool Home Page
Re: Invalid character in XML output
« Reply #2 on: April 17, 2020, 12:53:06 PM »
I can't reproduce this effect.  Could you email me a sample (philharvey66 at gmail.com) and tell me the exact command line that you are using?

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

Mac2

  • Sr. Member
  • ****
  • Posts: 248
Re: Invalid character in XML output
« Reply #3 on: April 17, 2020, 01:01:26 PM »
I will send you the video file (it's small).
The ARGs which allow to reproduce this are (condensed down)


-G1
-all
-a
-X
-charset
filename=UTF8
{FileName}

Phil Harvey

  • ExifTool Author
  • Administrator
  • ExifTool Freak
  • *****
  • Posts: 16537
    • ExifTool Home Page
Re: Invalid character in XML output
« Reply #4 on: April 17, 2020, 01:37:45 PM »
Got it, thanks!

This will be fixed in ExifTool 11.94 when it is released (maybe later today).

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

Mac2

  • Sr. Member
  • ****
  • Posts: 248
Re: Invalid character in XML output
« Reply #5 on: April 17, 2020, 01:43:05 PM »
Excellent  :)
Stay safe.

Mac2

  • Sr. Member
  • ****
  • Posts: 248
Re: Invalid character in XML output
« Reply #6 on: April 18, 2020, 12:48:25 PM »
I have tested the new release. It now works perfect with the problem video file.
Thank you very much  :)

Phil Harvey

  • ExifTool Author
  • Administrator
  • ExifTool Freak
  • *****
  • Posts: 16537
    • ExifTool Home Page
Re: Invalid character in XML output
« Reply #7 on: April 18, 2020, 01:55:41 PM »
Great.  Thanks for the confirmation.

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