public function remove()
    {
        if ($this->node->parentNode === null) {
            throw new LogicException('Can not remove element without parent node');
        }

        $removedNode = $this->node->parentNode->removeChild($this->node);

        return new Element($removedNode);
    }
public function remove()
    {
        if ($this->node->parentNode === null) {
            throw new LogicException('Can not remove element without parent node');
        }

        $removedNode = $this->node->parentNode->removeChild($this->node);

        return new Element($removedNode);
    }
public function remove ( ) { if ( $ this -> node -> parentNode === null ) { throw new LogicException ( 'Can not remove element without parent node' ) ; } $ removedNode = $ this -> node -> parentNode -> removeChild ( $ this -> node ) ; return new Element ( $ removedNode ) ; }
Removes current node from the parent.

@return \DiDom\Element the node that has been removed

@throws \LogicException if current node has no parent node
Removes current node from the parent .