php-internal-docs 8.4.8
Unofficial docs for php/php-src
Loading...
Searching...
No Matches
odt.php
Go to the documentation of this file.
1<?php
2
4
5$reader->open('zip://' . dirname(__FILE__) . '/test.odt#meta.xml');
6$odt_meta = array();
7while ($reader->read()) {
8 if ($reader->nodeType == XMLREADER::ELEMENT) {
9 $elm = $reader->name;
10 } else {
11 if ($reader->nodeType == XMLREADER::END_ELEMENT && $reader->name == 'office:meta') {
12 break;
13 }
14 if (!trim($reader->value)) {
15 continue;
16 }
17 $odt_meta[$elm] = $reader->value;
18 }
19}
trim(string $string, string $characters=" \n\r\t\v\0")
dirname(string $path, int $levels=1)
print_r(mixed $value, bool $return=false)
$reader
Definition odt.php:3
$odt_meta
Definition odt.php:6