XML2ODF(1)
hey bestie π welcome to the xml2odf(1) page β user commands edition β¨
πΈ NAME πΈ
xml2odf β create an ODF package from OpenDocument in XML form. No cap, that's literally the whole name vibe. π
β¨ SYNOPSIS β¨
xml2odf [-o outputfile] [-s] [inputfile]
π DESCRIPTION π
okay so OpenDocument can be a complete office document in a single XML file. The script takes that kind of document and creates a package. It's mainly useful as a postprocesser of a program that produces XML β a stylesheet, for example. (Yes, the original says βpostprocesserβ; we're not fixing it, bestie.) π
Inputfile is assumed to be an OpenDocument file in XML form. If there's no inputfile, the program will read from standard input. The flag -s adds the correct suffix to the filename according to what mime type is found in the XML file, in case you don't already know what document type you're packaging. π¦
If output file is not specified, output will be to standard out. π«Ά
Section 2.1.1 of Open Document Format for Office Applications says that the [content.xml] file contains the document content, along with the automatic styles needed for the document content. The [styles.xml] file contains all the named styles of a document, along with the automatic styles needed for the named styles. The application doesn't know which automatic style is needed for what, so it puts the same set of automatic styles into both files. π
One could assume that the inverse operation would be easier, but OpenOffice.org is quite happy to use the same names for two different automatic styles. For instance, a style used inside <style:footer> can have the same name as one used inside <office:text> but be a different paragraph style. This is reported as bug #90494 (http://www.openoffice.org/issues/show_bug.cgi?id=90494). π
π EXAMPLE π
run it like this, bestie:
xml2odf -o testdocument -s xml-file
π¦ SEE ALSO π¦
odftools(1), odf2xml(1) β go be nosy, iykyk π
π BUGS π
It doesn't handle external data β images and such. π
The library used for the parsing of XML expands empty elements from <element/> to <element></element>. It should not have an effect on the document parsing. Lowkey noted. π«Ά
π AUTHOR π
- SΓΈren Roug β Original author π«Ά
mwah π β this lil sign-off is brought to you by odfpy, dated 03/15/2009, on the XML2ODF(1) page. That's the footer energy, bestie, and we're done β¨π
π¦ where this page comes from
- opensuse-leap 16.0: python313-odfpy 1.4.2-bp160.1.11 Β· Apache-2.0 OR GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms