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

1 Like

LibreOffice 4.1.1? according to docProps/app.xnl


I have the same problem, and I unfortunately don’t have an .odt version either. Would be amazing if you could help, mikekaganski, and I’ll make sure to update to the newest version right after that!

Thanks in advance,


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.

Many thanks man you’re an action hero!

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.

I’ve saved it on my computer now could you perhaps remove it from here? Thanks again!

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.


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)

1 Like

Hi Everyone

I hope someone can help me.

I’ve the same problem as @Sergiosooto. Please help me.
If I proceed trying to import the data I lose most of my work

please help me

Don’t use old versions. New versions are released because bugs get fixed. tdf#149996 was fixed in 7.5.3.