public function replace(SimpleXMLExtended $child)
    {
        $node1 = dom_import_simplexml($this);
        $dom_sxe = dom_import_simplexml($child);
        $node2 = $node1->ownerDocument->importNode($dom_sxe, true);
        $node1->parentNode->replaceChild($node2, $node1);

        return $this;
    }
public function replace(SimpleXMLExtended $child)
    {
        $node1 = dom_import_simplexml($this);
        $dom_sxe = dom_import_simplexml($child);
        $node2 = $node1->ownerDocument->importNode($dom_sxe, true);
        $node1->parentNode->replaceChild($node2, $node1);

        return $this;
    }
public function replace ( SimpleXMLExtended $ child ) { $ node1 = dom_import_simplexml ( $ this ) ; $ dom_sxe = dom_import_simplexml ( $ child ) ; $ node2 = $ node1 -> ownerDocument -> importNode ( $ dom_sxe , true ) ; $ node1 -> parentNode -> replaceChild ( $ node2 , $ node1 ) ; return $ this ; }
Replaces the current element with the element specified

@param SimpleXMLExtended $child The element to replace me

@return this
Replaces the current element with the element specified