private function surroundInDiv(DOMNode $element, $class)
    {
        $div = $this->createElement('div');
        $div->setAttribute('class', $class);
        $div->appendChild($element);
        return $div;
    }