I am trying to go into a specific node and update the <Sql> tag.
I can update the inner text, but then it is leaving off the <Sql> tag which is then causing the Query to not be there.
What am I doing wrong?
foreach (XmlNode item in nodes) { if (item != null) { if (item.FirstChild != null) { if (string.IsNullOrWhiteSpace(item.FirstChild.Name) == false) { if (item.FirstChild.Name == "Sql") { item.InnerText = await serviceQueryFilter.InjectOrganizationFilter(userId, Id, item.InnerText).ConfigureAwait(false); item.InnerText = "<Sql>" + item.InnerText + "</Sql>"; // This is wrong, but after updating the text how do I re apply the <Sql></Sql> } } } } }