[Solved] LibreOffice File format error found at SAXParse

Help with installation and general system troubleshooting questions concerning the office suite LibreOffice.
Post Reply
bem
Posts: 6
Joined: Fri Jan 05, 2018 4:24 pm

[Solved] LibreOffice File format error found at SAXParse

Post by bem »

Please help!

I spent the past two days working on a non-profit collaborative proposal for funding, and suddenly I've lost the last two-thirds of the document. The following error comes up:

SAXException: [word/document.xml line 2]: Namespace prefix pic on bodyPr is not defined

I am using LibreOffice Version: 5.4.3.2 (x64) and Windows 10.

I have tried to attach it, but it looks to be bigger than the 128 KiB limit.

Any help would be GREATLY appreciated.

Betsy
Last edited by Hagar Delest on Wed Jan 10, 2018 9:13 am, edited 1 time in total.
Reason: tagged solved
Libre Office Version: 5.4.3.2 (x64)
Windows 10
User avatar
RoryOF
Moderator
Posts: 34586
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

Re: [Solved] LibreOffice File format error found at SAXParse

Post by RoryOF »

If you upload the file to a file-sharing site and post the URL here, someone will have a look and see if they can help. I remark that I have not seen that error before in a SAXException message.
Apache OpenOffice 4.1.15 on Xubuntu 22.04.4 LTS
bem
Posts: 6
Joined: Fri Jan 05, 2018 4:24 pm

Re: LibreOffice File format error found at SAXParse

Post by bem »

Thank you much. I've tried a few things, including changing the file extension name, adding pic to the name of the document, etc but all without luck.

https://drive.google.com/drive/folders/ ... sp=sharing
Libre Office Version: 5.4.3.2 (x64)
Windows 10
User avatar
RoryOF
Moderator
Posts: 34586
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

Re: LibreOffice File format error found at SAXParse

Post by RoryOF »

Both of the included documents open for me using OpenOffice 4.1.5; I've checked out the internal content and my tools indicate that their internal XML is well formed.
Apache OpenOffice 4.1.15 on Xubuntu 22.04.4 LTS
bem
Posts: 6
Joined: Fri Jan 05, 2018 4:24 pm

Re: LibreOffice File format error found at SAXParse

Post by bem »

As I mentioned, I had tried various things to get the document to reopen correctly, including converting it back to ods format. The document currently has 8 pages, whereas I previously had 17 or so, so I lost a huge amount of work. On the xml document, I still get an error - see attached screen shot.

Thanks
Attachments
libre error.odt
(19.2 KiB) Downloaded 313 times
Libre Office Version: 5.4.3.2 (x64)
Windows 10
Jan_J
Posts: 167
Joined: Wed Apr 29, 2009 1:42 pm
Location: Poland

Re: LibreOffice File format error found at SAXParse

Post by Jan_J »

The screenshot is poor jpeg. I'm not able to recognize type characters.
Much better idea is to use looseless image format for shots, like png.
Second good idea is to attach images directly to the post, instead of embedding them into odt (or doc, rtf, pdf) container.
JJ ∙ https://forum.openoffice.org/pl/
LO (7.6) ∙ Python (3.11|3.10) ∙ Unicode 15 ∙ LᴬTEX 2ε ∙ XML ∙ Unix tools ∙ Linux (Rocky|CentOS)
bem
Posts: 6
Joined: Fri Jan 05, 2018 4:24 pm

Re: LibreOffice File format error found at SAXParse

Post by bem »

Sorry about that. I've attached the error screen as a png instead now.

Any hope of getting the missing pages back?

Betsy
Attachments
libre error.png
Libre Office Version: 5.4.3.2 (x64)
Windows 10
John_Ha
Volunteer
Posts: 9583
Joined: Fri Sep 18, 2009 5:51 pm
Location: UK

Re: LibreOffice File format error found at SAXParse

Post by John_Ha »

Try these. I opened both with AOO and saved as .odt files. AOO seems to be able to cope with the error, and presumably does not write the error back in the saved .odt.
 Edit: AOO does not "cope with the error".

Experience with this and similar files has shown that all the user content before the error is displayed OK.

However, all the user content following the error, even well formed content, is not displayed even though it is still present in the document.xml file. If the corrupted .docx file is then saved, all the non-displayed user text is deleted and can never be recovered.

I think that LO used not to be able to open files with these errors but recent versions of LO do what AOO does, namely open the file, report the error, and display everything up to the error. 
Attachments
docx file.odt
(49.06 KiB) Downloaded 291 times
File 1.odt
(44.39 KiB) Downloaded 311 times
Last edited by John_Ha on Mon Jan 21, 2019 3:50 am, edited 1 time in total.
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.
bem
Posts: 6
Joined: Fri Jan 05, 2018 4:24 pm

Re: LibreOffice File format error found at SAXParse

Post by bem »

Your assistance is greatly appreciated. However, I am still missing a big chunk of the second half (plus) of the document. The docx document you resent does show almost another page that was otherwise gone. There are nearly 10 more pages missing still however. Is that the best that can be done, or is there still any hope of recovery?

Thanks,
Betsy
Libre Office Version: 5.4.3.2 (x64)
Windows 10
User avatar
RoryOF
Moderator
Posts: 34586
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

Re: LibreOffice File format error found at SAXParse

Post by RoryOF »

I don'y know if this has happened, but I post it as a general warning to others with a similar problem: if you get a SaxParse or other error when trying to open a file, You must not save over the damaged file. Doing so will overwrite the original file with (perhaps) a truncated version of the file. The damaged original file is the file we need to inspect, and hopefully, will be able to repair.
Apache OpenOffice 4.1.15 on Xubuntu 22.04.4 LTS
User avatar
acknak
Moderator
Posts: 22756
Joined: Mon Oct 08, 2007 1:25 am
Location: USA:NJ:E3

Re: LibreOffice File format error found at SAXParse

Post by acknak »

See if this one works for you; it has 23 pages when I load it in LibO.
Attachments
tb.docx
(187.58 KiB) Downloaded 335 times
AOO4/LO5 • Linux • Fedora 23
John_Ha
Volunteer
Posts: 9583
Joined: Fri Sep 18, 2009 5:51 pm
Location: UK

Re: LibreOffice File format error found at SAXParse

Post by John_Ha »

All the document text and all the comment text from the 186 kB file you uploaded.

If that still doesn't work see [Tutorial] How to find and un-delete Writer temporary files for

a) detailed instructions on how to recover your file as it was when you last opened or saved it, or as it was when it was last saved with AutoRecovery.
b) how to find previous versions of the file in the folder it is located in, but which have since been deleted.
c) how to un-delete the temporary files Writer wrote while you were editing the file, and then deleted. This will recover your file as it was when you last opened or you last saved it and is probably your best hope.
Attachments
comments.txt
(1.31 KiB) Downloaded 446 times
document.txt
(28.66 KiB) Downloaded 448 times
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.
bem
Posts: 6
Joined: Fri Jan 05, 2018 4:24 pm

Re: LibreOffice File format error found at SAXParse

Post by bem »

You're a star - the document is back in its entirety!

Many many thanks. I'll be much more careful with saving as odt unless absolutely necessary.

Betsy
Libre Office Version: 5.4.3.2 (x64)
Windows 10
John_Ha
Volunteer
Posts: 9583
Joined: Fri Sep 18, 2009 5:51 pm
Location: UK

Re: LibreOffice File format error found at SAXParse

Post by John_Ha »

bem wrote:Many many thanks. I'll be much more careful with saving as odt unless absolutely necessary.
You are almost there :-)

Always save as a .odt file. If you need to send someone a .doc create a separate copy. That way, if the .doc is corrupted you still have the good, correct .odt file.
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