主题:请高手帮我解释一段代码意思,有能力的进!
Dim TNode As Node
Dim i As Integer
For i = 1 To SmartTreeView.Nodes.Count
Set TNode = SmartTreeView.Nodes(i)
Set ElementNode = xmlDoc.createElement("NODE")
ElementNode.setAttribute "Caption", TNode.Text
ElementNode.setAttribute "Key", TNode.Key
ElementNode.setAttribute "Tag", TNode.Tag
If TNode.Parent Is Nothing Then
ElementNode.setAttribute "ParentKey", ""
Dim i As Integer
For i = 1 To SmartTreeView.Nodes.Count
Set TNode = SmartTreeView.Nodes(i)
Set ElementNode = xmlDoc.createElement("NODE")
ElementNode.setAttribute "Caption", TNode.Text
ElementNode.setAttribute "Key", TNode.Key
ElementNode.setAttribute "Tag", TNode.Tag
If TNode.Parent Is Nothing Then
ElementNode.setAttribute "ParentKey", ""