First, here's my code:
<?php
$xml = new DOMDocument();
$xml->preserveWhiteSpace = true;
$xml->loadXML('
<html>
<head/>
<body/>
</html>
');
$node = $xml->documentElement->getElementsByTagName('body')->item(0);
$node->parentNode->removeChild($node);
echo $xml->saveHTML();
?>
Any ideas as to why that doesn't preserve the whitespace? When I
change saveHTML to saveXML, it works just fine...