[Solved] LibreOffice File format error SAXParseException

Help with installation and general system troubleshooting questions concerning the office suite LibreOffice.

[Solved] LibreOffice File format error SAXParseException

Postby maH » Sun Jun 05, 2016 11:50 am

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
maH
 
Posts: 3
Joined: Sun Jun 05, 2016 11:37 am

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

Postby RoryOF » Sun Jun 05, 2016 2:35 pm

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.9 on Xubuntu 20.04.1 (mostly 64 bit version) and very infrequently on Win2K/XP
User avatar
RoryOF
Moderator
 
Posts: 32203
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

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

Postby RusselB » Sun Jun 05, 2016 2:41 pm

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.
User avatar
RusselB
Moderator
 
Posts: 6313
Joined: Fri Jan 03, 2014 7:31 am
Location: Sarnia, ON

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

Postby maH » Sun Jun 05, 2016 2:44 pm

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
maH
 
Posts: 3
Joined: Sun Jun 05, 2016 11:37 am

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

Postby RoryOF » Sun Jun 05, 2016 3:00 pm

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.9 on Xubuntu 20.04.1 (mostly 64 bit version) and very infrequently on Win2K/XP
User avatar
RoryOF
Moderator
 
Posts: 32203
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

Re: File format error found at SAXParseException

Postby maH » Mon Jun 13, 2016 10:49 pm

Thanks!! Non of them worked actually. However, I was able to extract the content of the document based on another post (https://forum.openoffice.org/en/forum/v ... php?t=1532)
OpenOffice 5.1.3.2
Ubuntu 16.04
maH
 
Posts: 3
Joined: Sun Jun 05, 2016 11:37 am

Re: File format error found at SAXParseException

Postby John_Ha » Tue Jun 14, 2016 12:46 am

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
Clipboard01.png
.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: 8219
Joined: Fri Sep 18, 2009 5:51 pm
Location: UK

Re: [Solved] File format error found at SAXParseException

Postby John_Ha » Wed Dec 14, 2016 3:08 pm

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: 8219
Joined: Fri Sep 18, 2009 5:51 pm
Location: UK


Return to LibreOffice

Who is online

Users browsing this forum: No registered users and 3 guests