This is driving me crazy.
For example I have some XML that looks like this
What I need to do is loop thru each child of that parent node and if the description contains the characters "x2" I need to delete that particualr child and move on to the next one.Code:<parent>
<child description="bratty"/>
<child description="brattyx2"/>
<child description="brattyx2"/>
</parent>
I cannot figure this out to save my life.
EDIT: I finally figured it out. I'm sure somone knows how to make it run faster but this is working well for me.
VB Code:
Set oNodeList = root.getElementsByTagName("child") For i = 0 To (oNodeList.length - 1) Set NewNode = oNodeList.nextNode If InStr(NewNode.getAttribute("description"), "x2") Then root.removeChild NewNode End If Next
