I have selected 2 elements (siblings) using PHP\'s DOMDocument (with a little help of DOMXPath).
$dom = new DOMDocument(\'1.0\', \'UTF-8\'); $dom->preserveWh
You can use the appendChild() method to move an existing node. So: