When passing the documentElement of an HTML or XML document to new XMLSerializer().serializeToString the result is only the "inner" XML of the element, the markup for the documentElement itself is missing. I will attach a test case demonstrating the problem. The behaviour is the same with Mozilla 1.4a and Netscape 7.02 so this doesn't seem to be a regression.
Created attachment 119569 [details] test case (documentElement is serialized and the result is shown with blue blackground, the markup for the documentElement is missing in all three examples)
*** This bug has been marked as a duplicate of 186554 ***