[Solved] LibreOffice File format error SAXParseException

Help with installation and general system troubleshooting questions concerning the office suite LibreOffice.
Post Reply
maH
Posts: 3
Joined: Sun Jun 05, 2016 11:37 am

[Solved] LibreOffice File format error SAXParseException

Post by maH »

I am trying to open a docx file in my Ubuntu system. However, I am getting an error of "File format error found at
SAXParseException: '[word/document.xml line 2]: Opening and ending tag mismatch: txbxContent line 0 and sdtContent
', Stream 'word/document.xml', Line 2, Column 2047(row,col)."

I was working with .odt, since I wanted to handover the file in docx format, I saved that in docx!! But now I couldn't open it. Please help me to fix it.
Thank you for any advice and helps.

Here is the attachment.
Last edited by maH on Mon Jun 13, 2016 10:54 pm, edited 1 time in total.
OpenOffice 5.1.3.2
Ubuntu 16.04
User avatar
RoryOF
Moderator
Posts: 34611
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

Re: File format error found at SAXParseException: '[word/do

Post by RoryOF »

Have you still the .odt? If so, Open that and Save As .doc. Any Microsoft application that can open a docx file can open .doc.
Apache OpenOffice 4.1.15 on Xubuntu 22.04.4 LTS
User avatar
RusselB
Moderator
Posts: 6646
Joined: Fri Jan 03, 2014 7:31 am
Location: Sarnia, ON

Re: File format error found at SAXParseException: '[word/do

Post by RusselB »

Open Office doesn't support saving in the .docx format
If you have to use the Microsoft formats, use .doc, but the later versions of Microsoft Office will work with the .odt format
OpenOffice 4.1.7, LibreOffice 7.0.1.2 on Windows 7 Pro, Ultimate & Windows 10 Home (2004)
If you believe your problem has been resolved, please go to your first post in this topic, click the Edit button and add [Solved] to the beginning of the Subject line.
maH
Posts: 3
Joined: Sun Jun 05, 2016 11:37 am

Re: File format error found at SAXParseException: '[word/do

Post by maH »

I dont have .odt file. Is there any other way in which I can recover my file? Thanks.
OpenOffice 5.1.3.2
Ubuntu 16.04
User avatar
RoryOF
Moderator
Posts: 34611
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

Re: File format error found at SAXParseException: '[word/do

Post by RoryOF »

Saving the file as .docx should not have overwritten the .odt file, so t hat should be on the disk. Try a file search to see if it can be found.

To try and recover your file, you should look in the backup and temporary directories pointed to by /Tools /Options /OpenOffice : Paths. Rename any files in those to the type of ODF file used and see if they contain your data. Download Recuva or PhotoRec (only one needed) and let it do an indepth recovery of deleted files on your computer. You may get a file containing some or all of your data (or not). Do this as a first priority; other use of the computer may overwrite any existing but deleted files and prevent their recovery. There is no guarantee that you will recover anything useful.
Apache OpenOffice 4.1.15 on Xubuntu 22.04.4 LTS
maH
Posts: 3
Joined: Sun Jun 05, 2016 11:37 am

Re: File format error found at SAXParseException

Post by maH »

Thanks!! Non of them worked actually. However, I was able to extract the content of the document based on another post (viewtopic.php?t=1532)
OpenOffice 5.1.3.2
Ubuntu 16.04
John_Ha
Volunteer
Posts: 9584
Joined: Fri Sep 18, 2009 5:51 pm
Location: UK

Re: File format error found at SAXParseException

Post by John_Ha »

maH wrote:I am getting an error of "File format error found at SAXParseException: '[word/document.xml line 2]: Opening and ending tag mismatch: txbxContent line 0 and sdtContent', Stream 'word/document.xml', Line 2, Column 2047(row,col).
For other who might have the same problem, the error message is identifying a problem in the file document.xml, in the folder word when the .docx file is unzipped.

The file contains only two lines, where the second line is very long. The error is in Line 2 at Column 2047 and the tags do not match. XML tags always have to match. For example, paragraph tags look like: <p>Some text in a paragraph.</p>

If you open document.xml with an XML compatible editor like Notepad++ with the XML Tools plug-in, the contents can be "pretty printed" with line breaks which make the content much easier to understand as the lines are all indented appropriately. ALternatively, start Internet Explorer and type C: in the address field, and then navigate to document.xml which will be displayed.
Attachments
.docx file as seen when un-zipped by 7-ZIP
.docx file as seen when un-zipped by 7-ZIP
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.
John_Ha
Volunteer
Posts: 9584
Joined: Fri Sep 18, 2009 5:51 pm
Location: UK

Re: [Solved] File format error found at SAXParseException

Post by John_Ha »

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