If you're sticking with DOMdocument, appending a new node is as simple as getting a reference to an existing node, creating child nodes, and then appending new nodes to those children. I've used XPath below, but any method that returns a DOMNode should work. The important part to remember is even though you've fetch a part of the tree, internally it's part of the original DOMDocument.
$xml = new DomDocument();
$xml->loadXml('<foo><baz><bar>Node Contents</bar></baz></foo>');
//grab a node
$xpath = new DOMXPath($xml);
$results = $xpath->query('/foo/baz');
$baz_node_of_xml = $results->item(0);
//create a new, free standing node
$new_node = $xml->createElement('foobazbar');
//create a new, freestanding text node
$text_node = $xml->createTextNode('The Quick Brown Fox');
//add our text node
$new_node->appendChild($text_node);
//append our new node to the node we pulled out
$baz_node_of_xml->appendChild($new_node);
//output original document. $baz_nod_of_xml is
//still considered part of the original $xml DomDocument
echo $xml->saveXML();