Page 1 of 1

[Solved] LibreOffice File format error found at SAXParse

Posted: Sat Jan 21, 2017 3:25 pm
by ersags
I too am having a similar error to the OP

File format error found at
SAXParseException: '[word/document.xml line 2]: Attribute w:hAnsiTheme redefined
', Stream 'word/document.xml', Line 2, Column 43301(row,col)

I have tried methods 1 and 3 of the link, viewtopic.php?f=7&t=80923&p=404588#p404588 don't have a clue how to do method 2 still can't open the file. The file has tried to be opened in MS Office to see if it can recover it and in desperation I changed the file extension to .odt and open it to see if that would help but no. Does anyone have any other methods I could try please? I have extracted the document.xml file and attached.

Edit:Helps if referring to a link to put it in there!!

Re: LibreOffice File format error found at SAXParse

Posted: Sat Jan 21, 2017 3:38 pm
by Zizi64
Similar topics:
viewforum.php?f=101

Re: LibreOffice File format error found at SAXParse

Posted: Sat Jan 21, 2017 3:39 pm
by RoryOF
Try this version. Please check that formatting and content are as you expect - you may have to make some adjustments.

[fixedRe: LibreOffice File format error found at SAXParse

Posted: Sat Jan 21, 2017 4:10 pm
by ersags
Thank you so much RoryOF, many hours of my wife's work has been recovered!

If it isn't very complicated I would love to know what you did to recover the file, always good to learn and then hopefully share!

Re: LibreOffice File format error found at SAXParse

Posted: Sat Jan 21, 2017 4:21 pm
by RoryOF
I opened the file in XML Copy Editor. It told me there was a duplicate tag at an address. I deleted that tag, told XML C.E. to check if the file was well formed, which it was, so I saved and uploaded the file to the Forum. Had there been another error, I'd have repeated the process of deletion etc until the file was clean.

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

Posted: Sat Jan 21, 2017 7:28 pm
by ersags
Thank you, I will get XML Copy Editor for future!

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

Posted: Sat Jan 21, 2017 7:32 pm
by RoryOF
If you are running on Windows there may be better XML editors, ones that do more structure analysis. XML Copy Editor only flags an error, it is not specific about the exact tag in error.