Question: I need to update the attribute value of bkp\_path using VB6.

XML File
--------

```
<ServerDetails>
    <Param src_path = "D:\Shapes\Rectangle" bkp_path = "D:\Colors\Red"/>
</ServerDetails>

```

I'm able to read values from XML file using

VB6 Code
--------

```
Dim doc As New MSXML2.DOMDocument
Set doc = New MSXML2.DOMDocument
Dim success As Boolean
'Load Config.xml
success = doc.Load("\Config\config.xml")

If success = False Then
  MsgBox ("Unable to locate the configuration file")
  Exit Function
Else
  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 If
End If

```

but can't figure out how to update attribute values.

Answer: 
This did the trick : 

`node.selectSingleNode("@bkp_path").Text = "D:\Colors\Blue"`
You need to get a reference to the node object then call `setAttribute()` to specify the new value:

```
node.setAttribute "bkp_path", "wibble"

```

Your code also reads the values from all the `Param` nodes but you may want to only use the first or update a specific one.