Edit attribute values of XML using VB6

bjk076

New Member
I need to update the attribute value of bkp_path using VB6.XML File\[code\]<ServerDetails> <Param src_path = "D:\Shapes\Rectangle" bkp_path = "D:\Colors\Red"/></ServerDetails>\[/code\]I'm able to read values from XML file usingVB6 Code\[code\]Dim doc As New MSXML2.DOMDocumentSet doc = New MSXML2.DOMDocumentDim success As Boolean'Load Config.xmlsuccess = doc.Load("\Config\config.xml")If success = False Then MsgBox ("Unable to locate the configuration file") Exit FunctionElse Dim nodeList As MSXML2.IXMLDOMNodeList Set nodeList = doc.selectNodes("/ServerDetails/Param") If Not nodeList Is Nothing Then Dim node As MSXML2.IXMLDOMNode For Each node In nodeList srcpath = node.selectSingleNode("@src_path").Text bkpPath = node.selectSingleNode("@bkp_path").Text Next node End IfEnd If\[/code\]but can't figure out how to update attribute values.
 
Back
Top