Exporting an office document as single, flat, plain-text XML file?

I could have sworn, in earlier OpenOffices, there was an export of a document to a single, plain-text, so-called “flat” XML file.

However, I’ve looked through the File/Save As menus, and I cannot find anything like that?

It is a bit of a pain exporting separate screenshots, and editing them to show the full export list - and so here is the full Save As list (of Writer) in both LibreOffice 4.2.1.1:

lo1-saveas.png

… and in Apache OpenOffice 4.0.1:

… on Ubuntu GNU/Linux.

Now, thankfully, I found this page: OpenOffice flat XML export (cnx.org) - which has this screenshot (re-uploaded to prevent link-rot; click for original location):

cnx.org.graphics3

… where there is clearly a “OpenDocument Text (Flat XML) (.fodt)” Save As option - which is nowhere to be found on my screenshots above!?

So

  • Where has the Flat XML “Save As” option gone?
  • I actually want to use this with an Impress document (which has no images, so embedding/linking is not an issue), so I can post back on this forum with a question; what are my options for that?

Thanks in advance for any answers,
Cheers!


EDIT: just found Getting the XML … - Ask LibreOffice, where the answer says:

Does your version of LibreOffice support saving as the OpenDocument Text (Flat XML) format …

… so apparently, there are versions that do not support the Flat XML format… So, an alternative question: where is it documented which versions of LO/OO support this “save as” operation, and which do not? And as a subquestion - would anyone know, why was it removed at all?

As @Pedro1 indicates, if you are installing from PPA it may either be a problem with the Ubuntu-provided version or simply an issue of a related package not having been installed. All PPA-supplied versions of LO are generally repackaged by the distribution managers to be compliant with the various customisations each distribution makes. Installing all packages from the website version offers the various flat XML options in the file type selection.

Thanks for that, @oweng - I’m not sure, but it could have been the “master” Debian .deb from the LibreOffice site (not the PPA, as I have an older OS, Ubuntu 11.04); I just unpacked the .debs and am actually running it from an “off-tree” folder - that could have something to do with it. Thankfully, installing the .jars as in my post below helped. Cheers!

Ah well, some searching later, I found this:

How to save as ‘flat’ xml .odt file (View topic) • Apache OpenOffice Community Forum:

LibreOffice comes with the flat xml format available out of the box.
Just use File > Save As, then scroll down the list of file types to “Open Document (Flat XML) .fodt”

Well, I guess not any more…

On Fedora 15, I had to install the “libreoffice-xsltfilter” from the repository. In was not part of the default installation package.
The filters are available here viewtopic.php?f=47&t=44216

ahha… this may bring us closer:

XML Flat Filters (View topic) • Apache OpenOffice Community Forum

Now and then, a user wants to save an OpenOffice document as a flat XML file, rather than the normal zipped file. If you run linux, you probably already have the flat file filters added.

Eh… no.

Otherwise, add them in this manner:

  1. Download the flat filters I have included.
  2. Open Open Office and go the tools menu, then the XML Filter Settings. …
    flat_filters.zip

Ahha… trying that, I note that there are four files in that zip:

filters/draw_flat_filter.jar
filters/presentation_flat_filter.jar
filters/spreadsheet_flat_filter.jar
filters/text_flat_filter.jar

… and thankfully (for me) flat xml presentation is one of them; this is what my XML Filter Settings in LO looked like:

lo-XML Filter Settings1.png

… and after adding those filters:

lo-XML Filter Settings2.png

… and finally, I can save as Flat XML .odp (or .fodp) now:

lo-fodp.png

… nice! :)

As a side note, this is how OpenOffice’s XML Filter Settings looks like for me:

oo-XML Filter Settings1.png

… unfortunately, when I try to add the .jars from the zip, I get:

oo-crash.png

… that is, the old “Due to an unexpected error, OpenOffice crashed…”

But, at least one works, so I’m happy now :)

Hope this helps someone,
Cheers!

@sddau, that must be a Ubuntu (or Linux) problem only. fodt saving is available on Windows without the need for any extensions/hacks.

Thanks for noting that, @Pedro1 - I wasn’t aware of the differences with Windows; cheers!