Skip to content

Commit

Permalink
Fix for reading Namespaces only usend in root node
Browse files Browse the repository at this point in the history
  • Loading branch information
Gianluca Giovinazzo committed Dec 4, 2020
1 parent b16e26c commit 3a6ba3c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/PhpSpreadsheet/Reader/Xml.php
Original file line number Diff line number Diff line change
Expand Up @@ -324,6 +324,8 @@ public function loadIntoExisting($pFilename, Spreadsheet $spreadsheet)
$xml = $this->trySimpleXMLLoadString($pFilename);

$namespaces = $xml->getNamespaces(true);
$namespacesDoc = $xml->getDocNamespaces(true);
$namespaces = array_merge($namespaces, $namespacesDoc);

$docProps = $spreadsheet->getProperties();
if (isset($xml->DocumentProperties[0])) {
Expand Down

0 comments on commit 3a6ba3c

Please sign in to comment.