Hi,
I have the following XML document:
If I want to say search for a tile node with id attribute of 3 and change the START node to TRUE.
I have got this so far:
XmlDocument xmlDoc = new XmlDocument();
xmlDoc.Load("xmlfile.xml");
XmlNode node = xmlDoc.SelectSingleNode("/MAP/TILES/TILE/START");
node.Attributes[0].Value = "TRUE";
xmlDoc.Save("xmlfile.xml");
But I have no idea how to find and change only the node with ID = 3.
Thanks
Jay
Loading
Jay WebsterPosted Mar 18, 2011, 9:31 PM