From the course: PHP: Exporting Data to Files

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Inspecting the structure of an OpenDocument text file

Inspecting the structure of an OpenDocument text file - PHP Tutorial

From the course: PHP: Exporting Data to Files

Start my 1-month free trial

Inspecting the structure of an OpenDocument text file

The odt template that we've created is basically a zip file with a different file name extension, so let's take a look at the structure of an OpenDocument text file by changing it's file name extension and unzipping it. I should warn you that doing this on a Mac corrupts the file, so if you're on a Mac, just watch. Let's change that file name extension. And at the same time, I need to correct the spelling of the template. It should be template, not temple. And then zip. We get a warning that the file might become unusable. That's no problem, just click Yes. And then unzip, I am using WinZip. I'll extract to a folder of the same name, and if we open that folder, you can see inside there are four other folders and a number of XML files, the most important file is this one, content.xml, this is the main content file. And this the one that we want to copy and convert to an XSLT style sheet, we can use a PHP script to do that. The META INF folder contains just one file, manifest.xml. This…

Contents