Hello,
I am trying to edit a specific node in an XML file using C#. I have
searched around for example code to do this. The only solutions I
have come across either add a new node to the doc or have me re-write
the entire doccument ... is there a way to open the doc, edit only a
specific node and then save the changes?
Here is an example of an XML document:
<?xml version="1.0"?>
<inventory>
<book>
<title>The Godfather</title>
<author>Mario Puzo</author>
<publisher>Signet</publisher>
<genre>Crime Drama</genre>
<price>$29.95</price>
<stock>5</stock>
</book>
</inventory>
How would I change only the "stock" node to "4" and save the file?
Thanks for your help,
Steve