I needed to simulate some user interaction with our webservices in an automated manner. This post is specific to one small part of this requirement – here we’re going to simply take some XML and change a value within the data and return this altered data.
The code is very simple but demonstrates how to deal with namespaces as well as using XmlDocument and XPath.
Note: I’m using XmlDocument here and XPath for simplicity but obviously this is not the most performant on large documents.