[Solved] LibreOffice Writer Format Error SAXParseException

Help with installation and general system troubleshooting questions concerning the office suite LibreOffice.
Post Reply
pham khanh
Posts: 2
Joined: Thu Sep 26, 2019 8:19 am

[Solved] LibreOffice Writer Format Error SAXParseException

Post by pham khanh »

When i try open my file by LibreOffice Writer ver 5.1.6.2 on Ubuntu 16.04
This file here https://drive.google.com/open?id=17J4qW ... 6Y8SAXDk6-
It shows me an error and i can't open it:
Error File format error found at SAXParseException: '[word/document.xml line 2]: Opening and ending tag mismatch: Fallback line 0 and p', Stream 'word/document.xml', Line 2, Column 26267612(row,col)
Image error below
Please help me to fix it. Thanks all!
Screenshot from 2019-09-26 13-31-50.png
This is the first time i post my question to forum. If i miss something, please remind me.
Last edited by pham khanh on Fri Sep 27, 2019 5:55 pm, edited 3 times in total.
LibreOffice 5.1.6.2 on Ubuntu 16.04
User avatar
Villeroy
Volunteer
Posts: 31279
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: LibreOffice Writer Format Error SAXParseException

Post by Villeroy »

Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
John_Ha
Volunteer
Posts: 9584
Joined: Fri Sep 18, 2009 5:51 pm
Location: UK

Re: LibreOffice Writer Format Error SAXParseException

Post by John_Ha »

Use LibreOffice to open the (34 MB) file and ignore the error message. It then opens, presumably up to the error.

Ask someone with MS Word to see if they can open the file.

I tried fixing the XML but the error location 26,267,612 was in the middle of a lot of peculiar text which I did not understand. 26,267,612 was not at, or even close to, an XML tag location which is what I would have expected. see [Tutorial] How to fix SAXParse error in LibreOff .docx files

Unzip the .docx to extract the other images.

See [Tutorial] Differences between Writer and MS Word files for why you should always work in and save files as .odt.
LO 6.4.4.2, Windows 10 Home 64 bit

See the Writer Guide, the Writer FAQ, the Writer Tutorials and Writer for students.

Remember: Always save your Writer files as .odt files. - see here for the many reasons why.
pham khanh
Posts: 2
Joined: Thu Sep 26, 2019 8:19 am

Re: LibreOffice Writer Format Error SAXParseException

Post by pham khanh »

Thanks Villeroy and John_Ha for your support.
Folow John_Ha's response, (viewtopic.php?f=101&t=89721), I Removed the repeated definitions from document.xml, but the result the same with you.
So I used Windows laptop of my friend and download Apache OpenOffice from http://www.openoffice.org/download/index.html. Open the .docx file with AOO. Save it as a .odt file. Now, I can open my file.
LibreOffice 5.1.6.2 on Ubuntu 16.04
John_Ha
Volunteer
Posts: 9584
Joined: Fri Sep 18, 2009 5:51 pm
Location: UK

Re: [Solved] LibreOffice Writer Format Error SAXParseExcepti

Post by John_Ha »

While you can open the file you may find that the last bit of the file has been lost. What seems to happen is that the XML up to the error is read ok but when the error is reached nothing after the error is read.
LO 6.4.4.2, Windows 10 Home 64 bit

See the Writer Guide, the Writer FAQ, the Writer Tutorials and Writer for students.

Remember: Always save your Writer files as .odt files. - see here for the many reasons why.
Post Reply