Does anyone know a way and/or a tutorial that shows how to update a XML textNode value?
I would like to know how to change,
09-04-2005, 03:49 PM
Before anything else, you might want to bookmark this...
Like most things in .NET, there are multiple ways of handling tasks, depending on your needs. Here's a simple snippet that opens an XML document, updates a node, and saves the document.
Dim loXMLDoc As XmlDocument = New XmlDocument
Dim loNode As XmlNode
loNode = loXMLDoc.SelectSingleNode("//ParentNode/ChildNode1/ValueNode2")
loNode.InnerText = "UpdatedMoreData"
loNode = Nothing
loXMLDoc = Nothing
06-30-2006, 05:05 PM
I've been looking around for days to find a SIMPLE sample - anbd this is just it - I can use this to read a value then update it - SIMPLE!
08-28-2008, 03:12 AM
I tried doing this with a function and failed... what am I doing wrong?
01-27-2009, 03:49 AM
Code that is very similar to this has worked for me in the past. Using SelectSingleNode is probably the most efficient way to do this.