Zend_Dom_Query is only for the dom query, so it does not provide an interface in itself to change the dom and save it, but it does provide PHP Native DOM objects that will allow you to do this. Something like this should work:
$dom = new Zend_Dom_Query($html);
$document = $dom->getDocument();
$elements = $dom->query('div[id="someid"]');
foreach($elements AS $element) {
$node = $document->createElement("div", "contents of div");
$element->appendChild($node)
}
$newHtml = $document->saveXml();
PHP Doc DOMElement, , dom:
http://www.php.net/DOMElement