Corrupted file : SAXException : Opening and ending tag mismatch: rPr line 2 and ins

Hello and greetings to everyone.

I don’t know if I am writing where I should but I got the same problem as many people, all my work is gone, my libreoffice began to freeze while I was working on a file. I had to force quit and then when I re-opened the file, it gave the error:

SAXException: [word/document.xml line 2]: Opening and ending tag mismatch: rPr line 2 and ins

I tried to follow th different faq on this forum about how to solve this issue. So I followed the 7 zip method, opening the .docx file I was working on. I then extracted the document.xml subfile. Try to correct by suprressing in the second line the column number it gave me as en error whe trying to open it. But nothing worked.

If somebody could help me that would be so life saving.

Regards,

Sophie

@Lauman, you have tagged your question common (which means all components of the suite).

If your question is actually about Writer, please re-tag it as such to help others looking for solutions.

Thanks.

1 Like

What does this mean exactly? How does one “suppressing the column” in an XML?

Note that the column that it shown you is just a position at which the reader was at the time of the error; the actual position is most likely earlier.

The problem should be identified in an XML editor, e.g. using such an editor’s validation function, which can show you the same position(s) in the file that would break in LibreOffice.

There is an XML plugin for Notepad++; but it is really poor - because it doesn’t represent you the XML in a readable form, unless you do an editing operation (“pretty print”); and that editing function breaks many things in XML, e.g. places where XML requires taking spaces into account (xml:space="preserve"). And it doesn’t show you the error location properly with overlong lines.

So e.g. my procedure is like that: use Notepad++'s XML plugin’s “pretty print”; use its “check XML syntax”; find the problem; notice some unique identifier nearby; undo the pretty-printing; find the same place using the identifier; do the changes to correct improper XML structure; repeat (usually, there would be more than one similar error).

Or you could attach the problematic file here, taking into account that it would be publicly accessible.

1 Like

Hello
I am having the same issue with my file and was wondering if someone could fix it please
template.docx (509.8 KB)

template.docx (510.2 KB)

1 Like

Thank you so much, appreciate it a lot!

Hi,
I’m desperate, I encountered a similar error with an old version of Libre Office (7.). I downloaded a new version, nothing happened. the error is not resolved. the libreoffice message is as follows: Erreur de format de fichier à la position
SAXParseException: ‘[word/document.xml line 2]: Opening and ending tag mismatch: rPr line 2 and ins
at C:/cygwin64/home/buildslave/source/libo-core/sax/source/fastparser/fastparser.cxx:604’, Stream ‘word/document.xml’, Line 2, Column 144448 at C:/cygwin64/home/buildslave/source/libo-core/writerfilter/source/filter/WriterFilter.cxx:213(row,col).

Is this repairable or do I have to start all over again?
In any case, thank you for your valuable help!!

présentation association.docx (915.2 KB)

présentation association.docx (915.4 KB)

1 Like

Thank you so much !
you’re the best !

Hello and thank you for your quick answer. Obviously I don’t understand anything to what you are saying. So instead of wasting everybody’s time, I have attached the file to this message, I don’t care if it is public. All I can get is 100 pages, when there was more than 200 before the problem. Regards and thank you, Sophie
l’envol de tosca manuscrit FINAL corrrsvds.docx (594.9 KB)

l’envol de tosca manuscrit FINAL corrrsvds.fixed.docx (595.5 KB)

Thank you so much !!!

I sorry but I have the same problem, file cannot be opened: SAXException: [word/document.xml line 2]: Opening and ending tag mismatch: rPr line 2 and ins
I’m at a lost, can someone help me, please?
The file can be downloaded at [link to G-drive]: Google Docs wird geladen

Thank you in advance.

https://drive.google.com/uc?export=download&id=1j6VO27E_1M6Lew6WwiJPtA6LqbfJVEWV

1 Like

Thank you, very much!!

mikekaganski you are savior, I almost lost my mind.

Hi, Mike,

I’m really hoping you can work the same magic you did for these other folks on the attached file. Editing is my profession, and I’ve lost about 220 pages from this document that I sorely need recovered. Happy to pay you for your time, too.
Demonica_full_manuscript__BAS-edit_(Oct-26-2023).docx (375.0 KB)

Cheers!

Brett

Demonica_full_manuscript__BAS-edit_(Oct-26-2023).docx (371.2 KB)

Wow! You are a king among men, sir. Many, many thanks! Again, though, I’m happy to throw you a few bucks for this. Just let me know. :slightly_smiling_face:

BTW, is there a way to prevent this from happening again? Should I be saving the file as ODT or something else while I work on it, then saving back to DOCX when I return the file to my client?

Cheers!

Brett

Use native file format for any program you use. For LibreOffice, it means use ODT for text documents, and only export to other external formats when sending someone who cant open ODT.

Also: you use version 7.3. We create new versions, not only because we introduce features, but also because we fix bugs.
But that doesn’t mean that the advise to use ODT would be less relevant :wink:

Oh, I didn’t know I was using an older version. I’ll upgrade immediately, and will always save in ODT from now on. Huge thanks again!!