fix
by
VG
:

XMLSerializable streamToXML method does not modify passed document.
It uses provided document only as factory for nodes.