Wednesday, January 11, 2017

Update Xml Element Using C#


           var xdoc = new XmlDocument();
            xdoc.Load(webConfigPath);
            var endpointNodes = xdoc.SelectSingleNode("/configuration/system.serviceModel/client /endpoint");
            if (endpointNodes != null)
                endpointNodes.Attributes["address"].Value = addressValue;

            xdoc.Save(webConfigPath); 

 

No comments:

Post a Comment

Comments

Search

Custom Search
Protected by Copyscape Plagiarism Software