Hi,
First off, I’d better admit that I’ve only recently started looking at the XML classes in notes, so be kind if my terms of reference are a bit funky.
I am trying to edit a node in an XML file via lotus script. The following function sets the text of a node element-
Function setText(element As NotesDOMElementNode, newValue,Byval trimWhiteSpace As Boolean) As String
' returns content of first child node of type Text.
Dim child As NotesDOMNode
Set child = element.FirstChild()
Do Until child.IsNull
If child.NodeType = DOMNODETYPE_TEXT_NODE Then
If trimWhiteSpace Then
newValue = trimString(newValue)
End If
child.NodeValue = newValue
Exit Do
End If
Set child = child.NextSibling()
Loop
End Function
When the line child.nodevalue runs, I can see in the debugger the text in the node is changed to the new value, but once the code finishes running, the xml file is unchanged.
Does anyone have any pointers on what I can do here?
Thanks,
Andrew.