Flash cannot parse this document – Adobe Flash CS5

By | August 11, 2010

I found a fix for a single case of “Flash cannot parse this document” error when opening a file saved from Adobe Flash CS5. Here is how it happened.

A designer friend of mine upgraded to CS5 recently and sent me an email in a panic when she got this error “Flash cannot parse this document” after trying to open up a file she had just saved. While she tried to salvage some of her work from a decompiler I took a look at if we could fix the file.

Some quick Google searching came up with the right clue to figuring out what was wrong. The user wbfreek21 got me on the right path to figuring out just what happened. He talks about how he was able to fix his particular file by going into the new XML based FLA format and removing empty XML elements from the DOM here.

That’s it! Flash cannot parse this document, it’s an error in the XML! I quickly followed the instruction to open the FLA as a ZIP and started poking around in the XML files. They were large, this wasn’t a small project. Firefox has an XML parser as well but it lists out where the problem characters are, I tried opening all the files in the LIBRARY directory in Firefox and instantly found the issue. The empty character that wbfreek21 reported was this ETX (End of Text) character that had found it’s way into the document. I pulled out that character and successfully opening up the file in Flash CS5 again much to the designers joy.

Here is the step by step process I used to find and remove the problem:

  1. Make a copy of your corrupt FLA and put it in a fresh folder, in case you need to repeat steps
  2. Rename the extension on your FLA to ZIP and extract the contents to a folder
  3. There are several XML files in the extracted folder structure, I found my corrupt file in the LIBRARY folder but all XML files should be tested. Open each XML file in Firefox, when you reach a corrupted file you will get an error page that looks like this:
  4. Open that document in a text editor that can show hidden ASCII characters, I used Notepad++ but I wasn’t able to find an editor that worked for a Mac sorry, scroll to the line that Firefox reported your error on and take a look at the code in there to see what your problem area was, my XML document looked like this:
  5. Save your XML file with the character removed and repeat steps 3 and 4 on the same file you found an error in and the rest of the XML files in the folder structure.
  6. Now open up your XFL file in the root of your extracted folder structure, you shouldn’t get any errors, if you get a parse error again repeat steps 3 through 5. Use Save As to make a copy of your file as a FLA, you’re all set!

29 thoughts on “Flash cannot parse this document – Adobe Flash CS5

  1. Orkan

    Thank you Thank you Thank you Thank you Thank you Thank you :) You saved my day thanks a million.

  2. Orkan

    One notice,

    I can’t find any parsing error in xml files but I have removed one xml (I try one by one) and xfl file is opened and I find why this xml can’t parse by cs5, I founded emtpy layers in this xml.

    Solution :
    Remove all in all xmls thats it.

  3. Pentrexyl

    Dude… damn… thank you so so so so so much… This stuff really saved my ass from working unnecessarily for a long time. I owe you a favor.

  4. GlassEgg

    Thank you so much for posting this in such a clear way–you saved my file and tons of time!!! I’m going to pop a celebratory beer and drink a toast to you!

  5. Luke S.

    Hi there,
    How do you change the file extension to .zip.

    Im working on a CS5 .fla file that has come up with this error.


  6. Garrett

    So happy I found this article. THANK YOU. Saved me at least a dozen hours.

  7. Ryan


    How do I open XML files in FireFox? The default is FireFox but it continues to open in IE

  8. sosuke Post author

    Us the top menu in FireFox, click on File then Open and then navigate to where your XML file is and you can always open it that way.

  9. juan david

    no se como lo hice, pero funcionó y estoy muy agradecido.

  10. Jill

    I can’t tell you how happy I am this worked. You saved me so many hours during my finals week that I couldn’t afford to lose!

  11. paz

    thankzzzzzzzzzzzzzzzzzzzzzzz u saved my whole unit
    thankz again n again

  12. HZ

    OMG, thank you very much man, I’ve been working on this file for a long time!

  13. Jake

    MAAAAN THANKS A MILION TIMES !!! this hellish error almost destryed my month worth of work … wow … never working with flash again … thanks !!!

  14. Edvin Candon

    Thanks alot! Swf decompilers just don’t do the trick when you have multiple nested animations..

    As for the xml fix, if you stumble upon an empty frame on a layer, be sure to remove the DOMLayer tag. All I did was delete:

    Thanks to Orkan too!

  15. Mos

    I can’t thank you enough, a month of work was saved thanks to this explanation.

  16. jakeZ

    You saved me an entire day of work!! Where’s the donate button, so I can buy you a beer, or coffee? You Rock, my friend!!

  17. hussam

    Really a life saver, I didn’t find XML Error but,
    some renaming items mismatch in the library causes this.

  18. Corinne

    Amazing! You saved me a bunch of time recreating the file. Thank you!

  19. Roman

    Thanks a lot!

    In my case it was link on unexisting Instance. I compared broken xml with a copy it was made from and saw different.

  20. anil Dash

    Thanks a lot!! you made the impossible job possible..
    Can’t thank you much!!

Leave a Reply

Your email address will not be published. Required fields are marked *

Comment moderation is enabled. Your comment may take some time to appear.

This site uses Akismet to reduce spam. Learn how your comment data is processed.