I have been sent a document saved in OpenOffice as an ODF file. When I open it it contains xml data and is not readily readable. I have tried to save as .sxw and .doc files but it is still the same. How do I convert this to a legible document?

Most ODF formats are a zipped archive containing XML files. The flat formats, like .fodt, are plain XML but these don't seem to be used that often. file will tell you hat the file actually is, rather than what the extension is claiming it to be.

"Insanity: doing the same thing over and over again and expecting different results." (Albert Einstein)

The file is a .odt format. I can open the document in LibreOffice but all I read is the xml data, the content is not readily readable. I have tried saving in different formats, eg .doc and .sxw, as suggested by various Google links but no change.

The file is a report written in OpenOffice. Not my file so I don't know what happened to it. I have been asked if I can help sort it out.

file command outputs 'OpenDocument text'

File is confidential so can't post up.

Since last post I have managed to extract the text content by a roundabout route - select all content, copy and paste into Quanta, select view which displays the text, copy the text and paste into a new doc in LibreOffice, save as .doc file. The text is completely unformatted so will need paragraphs, line breaks, etc added but at least the text is not lost and won't need to be retyped (report is 16 pages long).

So, have solved the problem for now but I still would be interested to know why it can't be opened properly in OpenOffice.

I get the same if a save a document as Microsoft Word 2003 XML from LibreOffice 3.6.3.2, it's not an ODF file. However, LO can also open the file here. My guess is that something screwed up when saving the file.

"Insanity: doing the same thing over and over again and expecting different results." (Albert Einstein)

At least I now have the full text to save retyping. i guess it will have to remain a question how it got like it. Let's just blame it on Ooo on Windows not saving correctly and thank Linux for being able to retrieve the situation.