Im trying to pass an XMLNode into a function, but when I try to replace the contents of the node InnerText, I get the following exception:
"Object reference not set to an instance of an object"
protected XmlNode deLocaliseDeAmpersand(XmlNode xn)
xn.InnerText = xn.InnerText.Replace("&", "$ampersand%");
xn.InnerText is valid as I can read the value inside but just can't set it and have tried using InnerXml instead but the same error.