[Solved] SAXParse error in LibreOffice docx file

Help with installation and general system troubleshooting questions concerning the office suite LibreOffice.
Post Reply
oobuntu
Posts: 4
Joined: Fri Jan 27, 2017 5:58 am

[Solved] SAXParse error in LibreOffice docx file

Post by oobuntu »

Hi!
I get an error message to open the document:
File format error found at
SAXParseException: '[word/document.xml line 2]: Attribute w:eastAsiaTheme redefined
', Stream 'word/document.xml', Line 2, Column 353077(row,col).

Unfortunately the backup-file gives the same error and there are on files in temp-folder of my Ubuntu 16.04 system. (The document was made in LibreOffice 5 but I could not find a great forum like this for LibreOffice.) I tried to follow the various tips and instruction in this helpful thread but did not succeed. I can extract the file and find the file document.xml. When I open document.xml in a text editor (gedit) I can scroll to Line 2, Column 230000 but it would not let me put the cursor in the text further to the right (higher column number).

The corrupted file can be found here xxxx

If you can recover, I would appreciate you put it in this folder again, thanks.

Any tip or recovery help is much appreciated.
 Edit: Link removed for confidentiality, Hagar (Moderator). 
Thanks in advance!
Last edited by RoryOF on Sat Jan 28, 2017 1:27 pm, edited 2 times in total.
Reason: tagged [Solved].
OpenOffice4 on Ubuntu 16.04
User avatar
RoryOF
Moderator
Posts: 34612
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

Re: [Solved] SAXParse error in LibreOffice docx file

Post by RoryOF »

Attached is the repaired file. Please check that it contains all the text and formatting you require.
 Edit: File deleted for confidentiality 
Apache OpenOffice 4.1.15 on Xubuntu 22.04.4 LTS
John_Ha
Volunteer
Posts: 9584
Joined: Fri Sep 18, 2009 5:51 pm
Location: UK

Re: [Solved] SAXParse error in LibreOffice docx file

Post by John_Ha »

See the [Tutorial] How to find and un-delete Writer temporary files which gives detailed instructions on how to identify and un-delete the temporary files Writer creates while a file is being edited, and then deletes when the file is saved and Writer is closed.

In most cases it will allow users to recover all or most of a .odt file.

Users need to act quickly to prevent the deleted files being overwritten.

Users with Solid State Disks will probably not be able to recover anything because the Operating System works silently in the background to overwrite all deleted files with zeros so as to speed future disk writes.
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.
oobuntu
Posts: 4
Joined: Fri Jan 27, 2017 5:58 am

Re: [Solved] SAXParse error in LibreOffice docx file

Post by oobuntu »

RoryOF wrote:Attached is the repaired file. Please check that it contains all the text and formatting you require.
Hi Rory!
Thanks a lot! Wonderful! How did you manage to do this?
I have been using OpenOffice/LibreOffice for about a decade but it is the first time a file got corrupted. And I am glad it could be restored!
The repaired file in docx-format (like the original) did not show all the text. But when I saved it as an odt-file it seems everything is visible again (incl. formatting)! Hallelujah! :D

Thanks, John, for the helpful link, unfortunately I have hybrid hard disk and when I close the file, all the temp-file disappear, too, as I now have found out.

Have a great day!
OpenOffice4 on Ubuntu 16.04
User avatar
RoryOF
Moderator
Posts: 34612
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

Re: [Solved] SAXParse error in LibreOffice docx file

Post by RoryOF »

I simply deleted a duplicate`tag and tested to check that the relevant part of the archive file was then correct. What I did should only have affected the formatting (if even that), not the content; perhaps this is an indication to work in .odt format.
Apache OpenOffice 4.1.15 on Xubuntu 22.04.4 LTS
oobuntu
Posts: 4
Joined: Fri Jan 27, 2017 5:58 am

Re: [Hint] How did I fix my ODT file

Post by oobuntu »

RoryOF wrote:I simply deleted a duplicate`tag and tested to check that the relevant part of the archive file was then correct. What I did should only have affected the formatting (if even that), not the content; perhaps this is an indication to work in .odt format.
Yes, I will work now even more in .odt format. The problem is the standard format of the school is still doc/docx and so I have to turn it in in this format.
How did you find the duplicate tag? Which text editor did you use?
OpenOffice4 on Ubuntu 16.04
User avatar
robleyd
Moderator
Posts: 5082
Joined: Mon Aug 19, 2013 3:47 am
Location: Murbko, Australia

Re: [Solved] SAXParse error in LibreOffice docx file

Post by robleyd »

Cheers
David
OS - Slackware 15 64 bit
Apache OpenOffice 4.1.15
LibreOffice 24.2.2.2; SlackBuild for 24.2.2 by Eric Hameleers
User avatar
RoryOF
Moderator
Posts: 34612
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

Re: [Hint] How did I fix my ODT file

Post by RoryOF »

XML Copy Editor flags a duplicate tag; the problem is that one is pointed to the duplicate, which may in fact be the correct tag, and one has to identify both the duplicate and the earlier tag, then decide which to remove. Often removal reveals or introduces another error.
Apache OpenOffice 4.1.15 on Xubuntu 22.04.4 LTS
John_Ha
Volunteer
Posts: 9584
Joined: Fri Sep 18, 2009 5:51 pm
Location: UK

Re: [Solved] SAXParse error in LibreOffice docx file

Post by John_Ha »

Notepad++ and the XML Tools add on should run under WINE on Linux. When you place the cursor in one tag it highlights both it and the matching tag.

Also see the LibreOffice part of this web site where there are other LibreOffice posts including Self-help methods to fix .docx files with SAXParse error.
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.
oobuntu
Posts: 4
Joined: Fri Jan 27, 2017 5:58 am

Re: [Solved] SAXParse error in LibreOffice docx file

Post by oobuntu »

Rory and John, thanks a lot for the helpful tips and the links :bravo: , I will follow the next time, although I hope there is no next time.
Cool, there is a LibreOffice forum within the OO-forum, thanks! :D
Robleyd's suggestion http://xml-copy-editor.sourceforge.net/ has also an Ubuntu version which I would try to use.
OpenOffice4 on Ubuntu 16.04
User avatar
RoryOF
Moderator
Posts: 34612
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

Re: [Solved] SAXParse error in LibreOffice docx file

Post by RoryOF »

If you are not familiar with the processes, do please have a copy file. This sort of low-level editing can render a file unusable, so it is essential to have a copy with minimal interference in case other intervention is needed.
Apache OpenOffice 4.1.15 on Xubuntu 22.04.4 LTS
Post Reply