mnash
October 21st, 2003, 08:27 AM
i am using msxml to create an xml file in vb6
<Patients>
<PatID>XXX</PatID>
<Forename>XXX</Forename>
<Sex>XXX</Sex>
</Patients>
whatb i want is to load this file and replace the text XXX with values from string sValue
Set oNodelist = oDom.documentElement.childNodes
For Each oNode In oNodelist
Select Case oNode.NodeName
Case "PatID"
sValue = "Lema"
oDom.appendChild oNode
case "Forename"
but this doesn work.
how can i update the Node text of each text with the new value?
<Patients>
<PatID>XXX</PatID>
<Forename>XXX</Forename>
<Sex>XXX</Sex>
</Patients>
whatb i want is to load this file and replace the text XXX with values from string sValue
Set oNodelist = oDom.documentElement.childNodes
For Each oNode In oNodelist
Select Case oNode.NodeName
Case "PatID"
sValue = "Lema"
oDom.appendChild oNode
case "Forename"
but this doesn work.
how can i update the Node text of each text with the new value?