public function unwrapInner()
    {
        foreach($this as $i => $node) {
            if (!$node->parentNode instanceof \DOMElement) {
                throw new \InvalidArgumentException('DOMElement does not have a parent DOMElement node.');
            }

            /** @var \DOMNode[] $children */
            $children = iterator_to_array($node->childNodes);
            foreach ($children as $child) {
                $node->parentNode->insertBefore($child, $node);
            }

            $node->parentNode->removeChild($node);
        }
    }
public function unwrapInner()
    {
        foreach($this as $i => $node) {
            if (!$node->parentNode instanceof \DOMElement) {
                throw new \InvalidArgumentException('DOMElement does not have a parent DOMElement node.');
            }

            /** @var \DOMNode[] $children */
            $children = iterator_to_array($node->childNodes);
            foreach ($children as $child) {
                $node->parentNode->insertBefore($child, $node);
            }

            $node->parentNode->removeChild($node);
        }
    }
public function unwrapInner ( ) { foreach ( $ this as $ i => $ node ) { if ( ! $ node -> parentNode instanceof \ DOMElement ) { throw new \ InvalidArgumentException ( 'DOMElement does not have a parent DOMElement node.' ) ; } /** @var \DOMNode[] $children */ $ children = iterator_to_array ( $ node -> childNodes ) ; foreach ( $ children as $ child ) { $ node -> parentNode -> insertBefore ( $ child , $ node ) ; } $ node -> parentNode -> removeChild ( $ node ) ; } }
Remove the matched elements, but promote the children to take their place.

@return \Wa72\HtmlPageDom\HtmlPageCrawler $this for chaining
@api
Remove the matched elements but promote the children to take their place .