Is it possible to SET an attribute value with XPath, like this?
XPathNavigator xNav = doc.CreateNavigator();
xNav.MoveToAttribute("requestID", String.Empty);
xNav.SetAttributeValue?? // need correct method to set a (new) value for current node-attribute..
Most probably (in the code that you haven’t shown), the XPathNavigator is constructed off an XPathDocument. An XPathDocument is read-only by definition (this is why it is much more efficient).
From the MSDN documentation:
If you want to update nodes using DOM, you must use another object — say an XmlDocument.
Of course, people realized long (7 -8 years) ago that DOM isn’t the best possible way of processing XML.
I definitely recommend to do XML processing using XSLT — a language especially designed for tree transformations.