Location: PHPKode > scripts > ODT 2 XHTML > odt-2-xhtml/docs.html
    <title>ODT2XHTML class DOCS</title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  <body bgcolor="#DDDDDD">
<font size="2">
<center><h1>ODT2XHTML class DOCS</h1></center>
<B>AUTHOR</B>: Piotr Maliński<BR>
<B>Contact</B>: <a href="mailto:hide@address.com">hide@address.com</a><BR>
<B>Site</B>: <a href="http://www.cms.rk.edu.pl">http://www.cms.rk.edu.pl</a> - Polish<BR>
<B>License</B>: LGPL, template.xsl from http://books.evc-cit.info/odf_utils/odt_to_xhtml.html<BR>
<B>Requirements</B>: PHP5 (and PECL ZIP extension is recommended)<BR><BR>

This class converts OpenDocument (ODT) filest to XHTML. OpenDocument are the default file format for OpenOffice Writer and Koffice KWord (supported also by AbiWord and other applications). Using this class you can convert ODT file to XHTML with pure PHP and operations on XML.<BR>
<B>Differences between OpenOffice2HTML</B>: this class supports only OpenDocument ODT files and uses XSLT transformation to get XHTML code (much better styles support).<BR><BR>

<div style="border: 1px dashed #2f6fab; color: Black; background-color: #f9f9f9; padding:2px;"><pre>$class = new ODT2XHTML;
echo $class->oo_convert($class->oo_unzip('test.odt'));</pre></div>


<B><font color="blue">oo_unzip($file, $path = false)</font></B> - $file is a patch to ODT file. This method will: 1. return a string - XML with the content, 2. save images (if any) to <B>$path/Pictures</B> ($path with trailing slash!). You need write permission on the target folder. It will throw an exception if ZIP functions aren't available or $file doesn't exist.<BR><BR>

<B><font color="blue">oo_convert($xml)</font></B> - returns XHTML code out of $xml string <BR><BR>

Return current item: ODT 2 XHTML