Make the document adopt the new XML nodes.