Hi,
I need to parse a particular node in an xml file to get all the nodes and childnodes of each node under a particular node.
Can anyone help me with the code?
I found a function on devguru.com and i have modified it a bit. But gives error 'Object not a collection' code: 800A01C3
Code:
Sub Drill(n)
msgbox(n.nodeName & "<br>")
cc = 0
while n.hasChildNodes
cc = cc + 1
set chd = n.childnodes
for each cld1 in chd
msgbox(cld1.nodeName)
for each att in cld1.attributes
msgbox(cld1.nodeName & " " & att.name & " " & att.value)
next
If cld1.nodeName = "AName" Then
msgbox("AName "& cld1.Text)
End If
Drill(cld1)
next
wend
End Sub