Bottom line: you're trying to shoehorn an XML fragment, including declaration, into the HTML DOM. There is no reason to expect it should work -- no standard dictates so.
This is redolent of another recent post about returning non-HTML elements into the HTML DOM. My recommendation is the same as I made to the other guy (Manu): massage out the invalid HTML (in his case, namespace non-standard tag names; in your case, take out the declaration), create an Elements collection, manage the updates using your own wrapper. If this problem befell me, I would probably massage the XML stream on the fly using a proxy server setup. But we already have such a proxy server in place -- if you don't, then fixing it up on the client is likely a better choice. -- Sandy
