| View previous topic :: View next topic |
| Author |
Message |
mikejd LXF regular
Joined: Fri Apr 08, 2005 5:46 pm Posts: 129 Location: Huntly, Aberdeenshire
|
Posted: Tue Nov 13, 2012 8:13 pm Post subject: Reading xml file |
|
|
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?
any help appreciated. |
|
| Back to top |
|
 |
nelz Moderator

Joined: Mon Apr 04, 2005 12:52 pm Posts: 8036 Location: Warrington, UK
|
Posted: Tue Nov 13, 2012 8:52 pm Post subject: |
|
|
What does the file command say it is?
_________________ "Insanity: doing the same thing over and over again and expecting different results." (Albert Einstein) |
|
| Back to top |
|
 |
guy LXF regular

Joined: Thu Apr 07, 2005 1:07 pm Posts: 861 Location: Worcestershire
|
Posted: Tue Nov 13, 2012 9:09 pm Post subject: |
|
|
What app are you trying to open it in?
ODF files are XML based, so opening the raw file in a text editor would show just what you are seeing.
If that's the problem, you need an ODF compatible app such as LibreOffice, OpenOffice or Abiword - see http://en.wikipedia.org/wiki/OpenDocument for a good list. _________________ Cheers,
Guy
The eternal help vampire |
|
| Back to top |
|
 |
nelz Moderator

Joined: Mon Apr 04, 2005 12:52 pm Posts: 8036 Location: Warrington, UK
|
Posted: Tue Nov 13, 2012 10:12 pm Post subject: |
|
|
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) |
|
| Back to top |
|
 |
mikejd LXF regular
Joined: Fri Apr 08, 2005 5:46 pm Posts: 129 Location: Huntly, Aberdeenshire
|
Posted: Wed Nov 14, 2012 9:38 am Post subject: |
|
|
Thanks for the replies.
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. |
|
| Back to top |
|
 |
nelz Moderator

Joined: Mon Apr 04, 2005 12:52 pm Posts: 8036 Location: Warrington, UK
|
Posted: Wed Nov 14, 2012 9:52 am Post subject: |
|
|
What should the file contain?
What is the output from "file filename.odt"?
Are the contents of the file private or it is it possible to post it somewhere so we can try it? _________________ "Insanity: doing the same thing over and over again and expecting different results." (Albert Einstein) |
|
| Back to top |
|
 |
mikejd LXF regular
Joined: Fri Apr 08, 2005 5:46 pm Posts: 129 Location: Huntly, Aberdeenshire
|
Posted: Wed Nov 14, 2012 12:57 pm Post subject: |
|
|
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.
Thanks for all help.
regards,
Mike |
|
| Back to top |
|
 |
nelz Moderator

Joined: Mon Apr 04, 2005 12:52 pm Posts: 8036 Location: Warrington, UK
|
Posted: Wed Nov 14, 2012 1:01 pm Post subject: |
|
|
Can the person who sent it to you open it? Are they using the same version of OOo? _________________ "Insanity: doing the same thing over and over again and expecting different results." (Albert Einstein) |
|
| Back to top |
|
 |
mikejd LXF regular
Joined: Fri Apr 08, 2005 5:46 pm Posts: 129 Location: Huntly, Aberdeenshire
|
Posted: Wed Nov 14, 2012 1:06 pm Post subject: |
|
|
They are able to open it but it cannot be read as it is in XML. Following is first 10 lines:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?><?mso-application progid="Word.Document"?><w:wordDocument xmlns:aml="http://schemas.microsoft.com/aml/2001/core" xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0" xmlns:dt="uuid:C2F41010-65B3-11d1-A29F-00AA00C14882" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0" xmlns:w10="urn:schemas-microsoft-com:office:word" xmlns:w="http://schemas.microsoft.com/office/word/2003/wordml" xmlns:wx="http://schemas.microsoft.com/office/word/2003/auxHint" xmlns:o="urn:schemas-microsoft-com:office:office" xml:space="preserve" w:embeddedObjPresent="no">
Don't know which version they use, I am using LibreOfficev3.5. |
|
| Back to top |
|
 |
nelz Moderator

Joined: Mon Apr 04, 2005 12:52 pm Posts: 8036 Location: Warrington, UK
|
Posted: Wed Nov 14, 2012 1:13 pm Post subject: |
|
|
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) |
|
| Back to top |
|
 |
mikejd LXF regular
Joined: Fri Apr 08, 2005 5:46 pm Posts: 129 Location: Huntly, Aberdeenshire
|
Posted: Wed Nov 14, 2012 1:21 pm Post subject: |
|
|
Thanks, nelz.
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.
cheers. |
|
| Back to top |
|
 |
Ram LXF regular

Joined: Thu Apr 07, 2005 10:44 pm Posts: 1570 Location: Guisborough
|
Posted: Wed Nov 14, 2012 3:43 pm Post subject: |
|
|
I'd guess the file was save in MS Word 2003 has an xml not odf in the first instance.
Have a read of this blog, it explains how too turn it into a normal xml file.
http://blogs.msdn.com/b/brian_jones/archive/2005/07/07/436647.aspx _________________
Ubuntu LXDE 12.04 running on AMD Phenom II*4; ASUS Crosshair III Formula MB; 4 GB Ram.....
|
|
| Back to top |
|
 |
| View previous topic :: View next topic |
|