I have two XmlDocuments, and I would like to move the XmlNode selected from one of the documents and add it to a specific location in another document.
The naively intuitive approach of simply calling AppendNode (xmlNodeFromDocument1) in the appropriate place in document 2 certainly does not work, because the method does not care about manipulating the ownership of the document.
I finally found the answer literally when I wrote this question, but since it took us so long to find it in the System.Xml classes, I thought I posted it here to help someone else find it.
source
share