diff --git a/src/PhpWord/Reader/Word2007/Document.php b/src/PhpWord/Reader/Word2007/Document.php index da42bddc9e..7bcb4a7aa3 100644 --- a/src/PhpWord/Reader/Word2007/Document.php +++ b/src/PhpWord/Reader/Word2007/Document.php @@ -45,7 +45,7 @@ public function read(PhpWord $phpWord): void { $this->phpWord = $phpWord; $xmlReader = new XMLReader(); - $xmlReader->getDomFromZip($this->docFile, $this->xmlFile); + $xmlReader->getDomFromZip($this->docFile, ltrim($this->xmlFile, '/')); $readMethods = ['w:p' => 'readWPNode', 'w:tbl' => 'readTable', 'w:sectPr' => 'readWSectPrNode']; $nodes = $xmlReader->getElements('w:body/*');