For those not closely reading the documentation (like me), this is an example of adding a root without add_root.
$new_dom = domxml_new_doc("1.0");
$new_element = $newdom->create_element("root_el");
$new_node = $newdom->append_child($new_element);