In C#, how do I replace a node in an xml with another node using XmlDocument.
For E.g, consider the following xml file.
<Products>
<Product ProdID="1">
<Data>abc</Data>
</Product>
<Product ProdID="2">
<Data>def</Data>
</Product>
</Products>
Let us say I need to replace
<Product ProdID="2">
<Data>def</Data>
</Product>
with a new node
<Product ProdID="2">
<Data>xyz</Data>
</Product>