URGENT! I NEED HELP SAXException: [word/document.xml line 2]: Opening and ending tag mismatch: hyperlink line 0 and p

I dont have any backup of the document. The document should have 35 pages at least and only open 15. I need help TFG.docx

LibreOffice 4.1.1? according to docProps/app.xnl

The file linked below seems to have 35 pages after my attempt at repair - please check it for formatting and completeness.


If this answer helped you, please accept it by clicking the check mark to the left and, karma permitting, upvote it. That will help other people with the same question.

In case you need clarification, edit your question (don’t use an answer) or comment the relevant answer.


I have exactly the same error message as Sergiosooto with an .odt file saved as .docx. Obviously I don’t have an .odt version, otherwise it would be too easy! If I send my document, could someone please help me? I’m a total computer nerd. Thanks in advance.

Perhaps you should start a new question, with your document attached, as this one appears to be solved. Include the full text of the error message in your question, please.
Although it may appear similar, it is likely that your problem is not exactly the same as this one.

1 Like

That’s very kind of you, but in the meantime, I found another (more ‘rustic’) solution.

I need your help. URGENTE! preciso de ajuda. Os detalhes do erro são: SAXException: [word/footer17.xml line 2]: Opening and ending tag mismatch: p line 2 and hyperlink


Please note that, despite some superficial similarity of the error message, the problem in your file is very different from what was in the document of OP. In your document, the word/document.xml contains a recurring erratic pattern like

<w:del ...><w:sdt><w:sdtPr><w:id w:val="..."/></w:sdtPr><w:sdtContent></w:del>...</w:sdtContent></w:sdt>

where w:del is positioned erroneously - it starts before w:sdt starts, it ends before w:sdtContent and w:sdt end - but after w:sdtContent starts.

It obviously related to tracking changes; and possibly the proper placement would be around the whole w:sdt; or maybe around w:sdtPr. Hard to say. But given the count of the problematic pieces, I can’t invest into rectifying it manually, and testing the different options. Maybe my explanation could help you do that yourself.

It would be very important to get a sample document (ODT) that would break like that when saved as DOCX - only then we could reproduce, find the error in code, and fix.

1 Like

Thank you very much for the explanation!!! I will try to do it manually then :slight_smile:

boa noite
estou com mesmo problema consegue me ajudar?
SAXException: [word/document.xml line 2]: Opening and ending tag mismatch: p line 2 and hyperlink
so que não estou conseguindo anexar o arquivo

Dear robleyd,

I’ve the same problem as @Sergiosooto. Please help me.

This is my file :
OdOC.docx (72.3 KB)

OdOC_fixed.docx (72.4 KB)


Cambiar el final del archivo de .docx a .zip

abierto en un descomprimido

Busque el archivo document.xml y comments.xml en la carpeta de Word

El texto está en este archivo.

abrir en el editor de texto

Tomará trabajo, pero puede recuperarse.

Atención: Trabaje con .odt, al final si es necesario guarde una copia como docx.

Change the ending of the file from .docx to .zip

open in an unzipped

Locate the document.xml and comments.xml file in the word folder

The text is in this file.

open in text editor

It will take work, but you can recover.

Attention: Work with .odt , at the end if necessary save a copy as docx.

1 Like