We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 887f0a6 commit c4937c0Copy full SHA for c4937c0
1 file changed
src/XML/SerializableElementTrait.php
@@ -31,7 +31,9 @@ trait SerializableElementTrait
31
public function __toString(): string
32
{
33
$xml = $this->toXML();
34
+
35
$doc = $xml->ownerDocument;
36
+ $doc = Dom\XMLDocument::createFromString($doc->saveXml($doc->documentElement));
37
38
if (static::getNormalization() === true) {
39
$normalized = DOMDocumentFactory::normalizeDocument($doc);
@@ -41,7 +43,6 @@ public function __toString(): string
41
43
42
44
// Non-normalized path
45
$doc->formatOutput = $this->formatOutput;
- $doc->normalizeDocument();
46
return $doc->saveXml($doc->documentElement);
47
}
48
0 commit comments