This has been referred to in a number of articles i have read online and in magazines lately. A couple of LJ's ago there was an article on manipulating the xml files in ruby, eg searching for styles in the text etc.
You don't need to change the format to .zip. just unzip file.sxw works. In winders you can drop the file on winzip and get the same effect. good stuff isn't it? On Wed, 24 Mar 2004 13:53:31 +1200 Jaco Swart <[EMAIL PROTECTED]> wrote: > Somewhere, I heard that sxw-files (OpenOffice equevalent of Word's > doc-files) contains standard xml files. To put this to the test, I tried > a little experiment, which you can try out if you have OpenOffice installed. > > 1. Create a new OpenOffice text document. > 2. Paste 'n graphic from the clipboard, and import a jpg file, a gif > file and a Photoshop psd file. Add some text. > 3. Save the file, eg "test.sxw". Then, using your favourite file > manager, rename the file to "test.zip". > 4. Use your favourite archiver to unzip the test.zip file into a > sub-folder. Then have a look at the content! > > Yes, a sxw file is simply a zip file containing a few xml files. For > instance, content.xml contains the text and references to the graphics, > and styles.xml contains what you would expect: style definitions. There > is also a folder called "Pictures", that contains all the graphics � and > here is the real nice bit: the jpeg and gif files you imported into your > document are saved in their original state. No resampling or anything. > Images that were pasted from the clipboard and Photoshop images are > saves as png files, which is cool. Note that graphic files are not > compressed � which can be a pro or a con, depending on how you look at it. > > How's that for open source � open down to the file format! IMHO, > OpenOffice rocks. I mean, try this experiment with a M$ Word file, and > see where you get ;-) > > rgds > Jaco -- Nick Rout <[EMAIL PROTECTED]>
