<?php $root = new DOMDocument(); $root->loadXML('<article id=""><h1></h1><p></p></article>'); $node = new DOMDocument(); $node->loadXML('<section><h1></h1><p></p></section>'); $node = $root->importNode($node->documentElement, true); $root->documentElement->appendChild($node); print $root->saveXML();
You have javascript disabled. You will not be able to edit any code.