protected function _remove_node(DOMNode $node, array &$children, $index)
    {
        $child = $children[$index];
        $previousChild = $child->previousSibling;
        $nextChild = $child->nextSibling;
        $node->removeChild($child);
        if (isset($previousChild, $nextChild)) {
            if ($previousChild->nodeName === "#text" && $nextChild->nodeName === "#text") {
                $previousChild->nodeValue .= $nextChild->nodeValue;
                $this->_remove_node($node, $children, $index+1);
            }
        }
        array_splice($children, $index, 1);
    }