Page 1 of 1

[Solved] LibreOffice File format error SAXParseException

Posted: Sun Jun 05, 2016 11:50 am
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.

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

Posted: Sun Jun 05, 2016 2:35 pm
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.

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

Posted: Sun Jun 05, 2016 2:41 pm
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

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

Posted: Sun Jun 05, 2016 2:44 pm
by maH
I dont have .odt file. Is there any other way in which I can recover my file? Thanks.

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

Posted: Sun Jun 05, 2016 3:00 pm
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.

Re: File format error found at SAXParseException

Posted: Mon Jun 13, 2016 10:49 pm
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)

Re: File format error found at SAXParseException

Posted: Tue Jun 14, 2016 12:46 am
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.

Re: [Solved] File format error found at SAXParseException

Posted: Wed Dec 14, 2016 3:08 pm
by John_Ha