Need help with corrupted file: SAXException: [word/document.xml line 2]: Opening and ending tag mismatch: sdtContent line 2 and del

Dear @mikekaganski, I have the same problems where a .docx was edited with comments and tags and now it’s not opening (not even the person that commented can open it in LibreOffice). Could you help somehow?
Here’s the file: Ladataan Google Docsia

Many thanks, Lisa

https://drive.google.com/uc?export=download&id=1-gcHRLr8VMB-sozYy6GCjU2uE9CzocAc

1 Like

You deserve a statue. Thank you for the super quick help!

xb_capstone_paper_v1_commented.docx (991.2 KB)

You are a wizard, my friend. Thank you so much for the help. I am really grateful. You saved me hours of extra work.

Out of curiosity: Is it a matter of locating the mismatched tags in the XML and correcting them, or is there more to the story? And, if that is the way to solve it, how do you approach that in general?

Hopefully I won’t have to deal with this again, but if there are any lessons to learn here, I’m all ears.

Of course, if you would rather not explain your methods, no complaints from me. :slight_smile: I just really appreciate you being willing to take time to help folks like myself.

Thank you!

Yes.

I’m not quite sure I understood the question. Basically, I am a LibreOffice developer myself, and I did quite some changes around OOXML import and export, so I have rather good understanding of the format structure, and thus it often is easy to me to see which change makes sense, and which is not. It’s not a question of not wanting to share the knowledge; rather, it’s difficult to me to describe this.

Yes, I also hope you won’t face this, after you upgraded to 7.5.2, where tdf#147892 is finally fixed. But the general lesson to learn is: whenever possible (i.e., unless your workflow absolutely prohibits this), always save in the native format (here: ODT). Only save to external file formats when sending to someone, and keep the original version in ODT. This is not a 100% guarantee, but the odds that native file format is more robust are higher than for external formats.

1 Like

Great. Thanks for all of the information, and thank you again for your generosity in sharing your time and knowledge helping me and others. I really really appreciate it.

Hellow, I am having the problema related to it, I have tryied do solve it but it seems is not that easy. The original document has around 130 pages but it only open 11.
DISSERTAÇÃO correção professor.docx (975.7 KB)
Could u please helpe-me!

DISSERTAÇÃO correção professor.docx (994.5 KB)

Oh my man, thank you very much, you saved me a lot of time. But if it is not ask too much I really would like to have a tutorial about it :smiley: i tryied do fix it manually but didnt find a pattern. I dont know a thing a bout code but I am curious. Again thank u very much!!!.

:smiley:

This was tdf#149996 (so a bit different issue). And it was caused by a hyperlink including an anchor to a shape with inner text box. Note that the fix version is 7.5.3, so not released yet - and it means that if you re-create such a formatting, saving it to DOCX will break again.

The problem was that the hyperlink closed prematurely. I found the problematic closing tag, then found its opening counterpart (on a very different level). I saw that the hyperlink was intended to span at least over two text runs, the second of them containing the anchor; but to avoid the problem, I simply moved the closing tag after the first text run.

I’m sorry if this looks cryptic. As said: it’s really easy after you spent years working on this.

thank u again, very, vey, very much!!!

I have the same proble, could u please help?
KosmosKrMmKr.docx (321.5 KB)

KosmosKrMmKr_fixed.docx (321.3 KB)

1 Like

Hi @mikekaganski,

Can you please help with this file?

I encountered this problem when using libreoffice 7.5.2. I upgraded the version to 7.5.5, I am still not able to open the file. Your help is much appreciated.

Thanks,
Eng Kuan

Hi Mike,
I can’t open the google drive link. Can you please resend?
Thanks,
Eng Kuan

Please try again.

It works! Thank you so much for your help, Mike. Literally saving me hours of work. Can’t thank you enough! Have a wonderful day. :slight_smile:

You are the man @mikekaganski!

I love seeing you helping so many people here.

Thanks for all of your great work!