You remove the node by telling the parent node to remove the child:
$href->parentNode->removeChild($href);
See DOMNode::$parentNodeDocs and DOMNode::removeChild()Docs.
See as well:
- How to remove attributes using PHP DOMDocument?
- How to remove an HTML element using the DOMDocument class