<div dir="ltr"><div>This seems to be correct in assumption that document output is treated separately. Quick testing shows that it's using some internal interface that the document object implements. It might be used to lock/unlock document while writer is populating it. So to improve the tests I think it would be interesting to see if written nodes appear right away on SAX calls, and if modifying methods of IXMLDOMDocument are indeed disabled during this process. Another case that's not tested is writing to non-empty document. Also you can remove the part that uses attributes, I don't think it's valuable.</div></div>