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 7c1f614 commit e32607eCopy full SHA for e32607e
src/AbstractElement.php
@@ -153,10 +153,10 @@ public static function getChildrenOfClass(DOMElement $parent): array
153
&& $node->namespaceURI === static::getNamespaceURI()
154
&& $node->localName === static::getLocalName()
155
) {
156
- // Normalize the DOMElement by importing it into a clean empty document
157
- $newDoc = DOMDocumentFactory::create();
158
/** @var \DOMElement $node */
159
- $node = $newDoc->appendChild($newDoc->importNode($node, true));
+ $node = $parent->ownerDocument->appendChild(
+ $parent->ownerDocument->importNode($node, true),
+ );
160
161
$ret[] = static::fromXML($node);
162
}
0 commit comments