Typed information went missing

I have been using LibreOffice writer to write my document. As I write, I save my files here and then. Today I faced an issue, where the typed content in the document went missing.

when I opened the document, all I can see is the older version of the file and newer changes that I have made and saved went missing. I have checked the backup folder, no file was there.

In addition, I found a new file with the same name as of my document in XML format. This file contains all my saved changes but all the format and the pictures I used were gone.

What is the reason behind this? why issue happens, how this issue can be prevented. I can understand making multiple copies and backups would enable preventing this, but its not the ultimate solution for the problem.

So kindly share your thoughts and knowledge to solve this problem to get the original version of the document and why this happens and how it can be prevented

You didn’t mention OS name, LO version and save format. That would help to understand the problem.

What is the extension of the “XML document”? Is it .fodt? If so, this is a LO-supported format. All you have to do is to force opening it in Writer (or launch Writer, File>Open and request display of all file types). Formatting and pictures are saved in this file using a special XML encoding. Your pictures are also there in Base64 form (a trick to record binary data as a text string).

Saving as .fodt may result from an accidental misuse of the save dialog. But there is no loss of data. This save format is nearly the same as .odt except it is not zipped. It is handy to examine formatting when you have doubt about interpretation.

Hi, thanks for your reply.

Am using Windows 10. The extension of the XML document is just “.XML”. When I opened the properties it shows,
Type: ProjectLibre(.XML)

its not in .fodt

Try nevertheless to open it with Writer. LO usually ignores the extension and reads the beginning of the file to check it can use it. If the encoding looks fine, it routes it to the adequate component (Writer, Calc, Impress, …). If this does not work, change the extension for .fodt.

Thank you for your suggestion.