Adds nodes after the document root.
<?php
$doc = new DOMDocument;
$doc->loadXML("<hello/>");
$doc->append("beautiful", $doc->createElement("world"));
echo $doc->saveXML();
?>
The above example will output:
<?xml version="1.0"?>
<hello/>
beautiful
<world/>