Unable to parse FCP XML file

  • oct5ch
  • oct5ch's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
More
10 years 1 month ago #1427 by oct5ch
oct5ch replied the topic: Unable to parse FCP XML file
well, most of my clips' names are created by FCPX, it would take a lot of work to rename all the clips cuz there are too many, so I decided to edit first then see which clip should I be dealing with.

THANKS a lot for the tip.

Please Log in to join the conversation.

  • Graeme Robinson
  • Graeme Robinson's Avatar
  • Visitor
  • Visitor
10 years 1 month ago #1425 by Graeme Robinson
Graeme Robinson replied the topic: Unable to parse FCP XML file
Has this happened again then? Is there some kind of pattern to how this is happening?

Your command is almost correct. You're just missing a tilde (~) at the beginning of the path. It should be like this:
perl -ne '/<clip name="(.*\000.*)" offset="/ and print "$1\n";' "~/Desktop/Containing/Project.fcpxml"

In Unix (OS X is a type of Unix) a tilde at the beginning of a path means the user's home directory, and your desktop folder is located within your home directory.

Instead of typing in the path by hand, you can remove the path completely from the end of the command (also remove the quotes, but leave the space) and drag/drop your fcpxml on the terminal. This will insert the path to your fcpxml after the partial command that is already typed (the path may look slightly different, but will still work), and all you would have to do is press enter.

Please Log in to join the conversation.

  • oct5ch
  • oct5ch's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
More
10 years 1 month ago #1423 by oct5ch
oct5ch replied the topic: Unable to parse FCP XML file
Hi, I am really not good at using the terminal, say if I put the XML file on the desktop, and my command would be

perl -ne '/<clip name="(.*\000.*)" offset="/ and print "$1\n";' "/Desktop/Containing/Project.fcpxml"



is that right?

Please Log in to join the conversation.

  • Graeme Robinson
  • Graeme Robinson's Avatar
  • Visitor
  • Visitor
10 years 2 months ago - 10 years 2 months ago #1261 by Graeme Robinson
Graeme Robinson replied the topic: Unable to parse FCP XML file
You can tell whether it is the same issue again because the error message will contain the text "Char 0x0 out of allowed range". It will also mention a line number (in the photo that you attached it was line number 2348). To find the name of the clip, you can open the fcpxml in TextEdit then jump to that line by clicking Edit>Find>Select Line... (or CMD+L). In the selected line there will be the name of the clip with the invalid character.

X2Pro will only report one clip name at a time so if there are lots of clips with invalid characters it could take a while to go through them. Another way which is more complicated (i.e. it requires using the terminal) but will list all the problematic clip names is to use the following command:
perl -ne '/<clip name="(.*\000.*)" offset="/ and print "$1\n";' "/Path/To/Folder/Containing/Project.fcpxml"
obviously the path to your fcpxml file will need changing if you use the terminal command.
Last Edit: 10 years 2 months ago by Graeme Robinson.

Please Log in to join the conversation.

  • oct5ch
  • oct5ch's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
More
10 years 2 months ago #1260 by oct5ch
oct5ch replied the topic: Unable to parse FCP XML file
Hi, I have renamed the clips' names and succeeded in imported XML file to X2Pro. Thank you for the suggestion. Another question though, how do I recognize those clips' names with unprintable character? Just in case that my later project might facing the same problem.

Please Log in to join the conversation.

  • oct5ch
  • oct5ch's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
More
10 years 2 months ago #1259 by oct5ch
oct5ch replied the topic: Unable to parse FCP XML file
Thanks a lot. I will try to rename those clips see if it works. And, yes, I use FCP X to create the names.

Please Log in to join the conversation.

  • Graeme Robinson
  • Graeme Robinson's Avatar
  • Visitor
  • Visitor
10 years 2 months ago #1258 by Graeme Robinson
Graeme Robinson replied the topic: Unable to parse FCP XML file
That FCPXML file appears to contain invalid XML. I wasn't able to open it in a couple of XML editors for the same reason that X2Pro is reporting.

The root of the problem seems to be 3 clips with very strange names:
- "Mouse room_3T1_.A_sync"
- "3rd F_2T1_.A_sync"
- "2_2T1_.A_sync"

These 3 clips names all contain an unprintable character between "T1_" and "A_sync". In the clip names above, the unprintable character has been replaced by a dot (".")

I have removed these 3 characters from the fcpxml file here and X2Pro is then able to read the file.

I may be able to give you the edited fcpxml to try, but before I do that, are you able to rename these 3 clips so that they don't contain the invalid character, export the fcpxml, then opening it in X2Pro again?

How were these file names created? Did you type the file name, or was it created by FCP X or a plugin to FCP X?

Please Log in to join the conversation.

  • oct5ch
  • oct5ch's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
More
10 years 2 months ago #1255 by oct5ch
oct5ch replied the topic: Unable to parse FCP XML file
Here is the XML file, thanks.
Attachments:

Please Log in to join the conversation.

  • Graeme Robinson
  • Graeme Robinson's Avatar
  • Visitor
  • Visitor
10 years 2 months ago #1244 by Graeme Robinson
Graeme Robinson replied the topic: Unable to parse FCP XML file
Can you please attach your FCPXML file?

Please Log in to join the conversation.

  • oct5ch
  • oct5ch's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
More
10 years 2 months ago #1243 by oct5ch
oct5ch created the topic: Unable to parse FCP XML file
Hi, I just downloaded the newest version X2Pro, but finding that it unable to parse FCP XML file.

I got this warning. What should I do to fix the problem?

http://imgur.com/67tYKBd


OS: 10.9.4
FCP X: 10.1.2

Please Log in to join the conversation.

Time to create page: 0.157 seconds
Powered by Kunena Forum