My Problem Is My XML file having Two namespace ,so i cant change text of xml in SelectingNode Method
XmlTextReader reader = new XmlTextReader("C:\\test.xml");
XmlDocument doc = new XmlDocument();
doc.Load(reader); //Assuming reader is your XmlReader
XmlNamespaceManager oManager = new XmlNamespaceManager(doc.NameTable);
oManager.AddNamespace("ns", "http://schemas.microsoft.com//sqlserver//reporting//2005/01//reportdefinition");
oManager.AddNamespace("rd", "http://schemas.microsoft.com//SQLServer//reporting//reportdesigner");
doc.SelectSingleNode("/ns:Report/ns:buttons/ns:workshop1", oManager).InnerText = "new text";
reader.Close();
doc.Save(@"C:\\test.xml");
Xml File is Having More than One namespace so problem is here icant resolve it.
and my XML file is
<?xml version="1.0"?>
<Report xmlns="http://schemas.microsoft.com/sqlserver/reporting/2005/01/reportdefinition" xmlns:rd="http://schemas.microsoft.com/SQLServer/reporting/reportdesigner">
<buttons>
<workshop1>Google</workshop1>
<url1>www.google.co.uk</url1>
</buttons>
</Report>