Hi!

I'm using DOM in an Visual Basic environment. My problem is that I want to
append childnodes to the parents of the nodes I have in a nodelist. When
I am debugging my source code I can see that new nodes are inserted at the
right place but when the next node in the for loop is to be inserted, the
previous inserted node disappear..! In other words, only the last node in
the for loop is included in the DOMDocument.

Code:

Set objCarryOver = objContext.selectNodes("descendant::alt[attribute:rofile='440.1991.2.83']")
For i = 0 To objCarryOver.length - 1
Set objParentNode = objCarryOver(i).parentNode
objParentNode.appendChild objNode
oDoc.save (App.Path & "\latsource01x.xml")
Next i

Thanks in advance // Niklas