XML in Star Office and OpenOffice

One of the greatest features of the fantastic Star Office (also known as OpenOffice.org, or OOo) is that all of its default file formats are so tiny in size. For instance, I once created a 40-page document and saved it in the default Star Office Writer format, which ends in .sxw. The file was 25kb. Only 25kb. If that file had been saved in Microsoft's Word document format, ending in .doc, it would probably have been 10 times that size, closer to 400kb.

So why are Star Office files so outrageously small? Because each document file is actually a zipped archive of several XML files.

That's right. If you have WinZip on your PC, just use it to open the .sxw file and you'll see that it's actually an archive of several XML files:

This sounds great—and it is great—but there is one point of confusion for people. If you decide that you'd actually like to view the contents of these XML files, you'll find that it's one long line that is just jumbled together without any apparent formatting.

Actually, this is easily fixed.

1. Open Star Office.

2. Tools menu > Options > Load/Save > General > Uncheck 'Size optimization for XML format (no pretty printing)' > OK.

By default, Star Office crams all the XML together to make the file smaller. If you uncheck the box, then it comes out all nice.

This will slightly increase the times it takes to open and close the document, but if you need to view the XML (in order to work with it programmatically, for instance), it can be worth it.

WebSanity Top Secret