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 - PHP Tutorial
From the course: PHP: Exporting Data to Files
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…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
-
-
-
-
(Locked)
Creating a .odt file to use as a template4m 29s
-
(Locked)
Inspecting the structure of an OpenDocument text file2m 43s
-
(Locked)
Extracting the main content file from a .odt document5m 2s
-
(Locked)
Converting the main content file to XSLT8m 3s
-
(Locked)
Outputting the database result as a .odt file7m
-
(Locked)
-
-