diff --git a/src/Util/XML.php b/src/Util/XML.php index e2cedf753..5599ebde3 100755 --- a/src/Util/XML.php +++ b/src/Util/XML.php @@ -48,6 +48,12 @@ class XML throw new Exception($message); } + $xpath = '//*[not(normalize-space())]'; + + foreach (array_reverse($xml->xpath($xpath)) as $remove) { + unset($remove[0]); + } + $result = json_decode(json_encode($xml), true); return $result;