public function remove(DOMElement &$element)
    {
        if (empty($element->parentNode)) {
            throw new DOMException('The current DOMItem has no parent.');
        }

        // Remove the element
        $element->parentNode->removeChild($element);
    }
public function remove(DOMElement &$element)
    {
        if (empty($element->parentNode)) {
            throw new DOMException('The current DOMItem has no parent.');
        }

        // Remove the element
        $element->parentNode->removeChild($element);
    }
public function remove ( DOMElement & $ element ) { if ( empty ( $ element -> parentNode ) ) { throw new DOMException ( 'The current DOMItem has no parent.' ) ; } // Remove the element $ element -> parentNode -> removeChild ( $ element ) ; }
Remove the DOMItem from the parent

@param DOMElement $element The DOMElement to handle.

@throws DOMException
Remove the DOMItem from the parent