I need to change /price in the XML document using C#, but I can't figure out how to select the node to change it's value.
{
XmlDocument doc = new XmlDocument();
doc.Load(@"C:\Users\Wurf\Desktop\c#\books.xml");
Console.WriteLine("Podaj ID książki której cenę chcesz zmienić.");
string idKsiazki = "bk" + Console.ReadLine();
XmlNode wezel = doc.SelectSingleNode("//book[@id=" + idKsiazki + "]/price");
Console.WriteLine("Podaj nową cenę książki.");
wezel.Value = Console.ReadLine();
doc.Save(@"C:\Users\Wurf\Desktop\c#\books.xml");
Here's a part of the XML Document
<catalog>
<book id="bk101" genre="Computer">
<author>Gambardella, Matthew</author>
<title>XML Developer's Guide</title>
<price>44.95</price>
<publish_date>2000-10-01</publish_date>
<description>
An in-depth look at creating applications
with XML.
</description>
Here's a way to do it following your sample code