This is what happens in a nutshell: if you have an XML document that contains something in prolog, and you load that document with document.load(), then serialize it with XMLSerializer, the prolog is serialized in the epilog. This does not happen if you load the document with XMLHttpRequest. A quess to the reason might be that for some reason we end up using HTML serializer, which messes up with the prolog. Haven't debugged this yet. There is a testcase in the tree under mozilla/content/xml/tests/load, but I will also attach a testcase.
Doh, I had filed this earlier... *** This bug has been marked as a duplicate of 98788 ***
Status: NEW → RESOLVED
Last Resolved: 17 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.