Case 9: 'Document Node - "Root" node. No need to display, just display sub-nodes
'Traversing the child's child's node is to write:), SO Easy
Intcount = nodnode.childnodes.length
IF Intcount> 0 THEN
For intNode = 0 to intcount-1
Strnodes = strnodes & renderchildNodes (Nodnode.childNodes (intNode), Intlevel 1)
NEXT
END IF
Case Else: 'Native Node
Strnodes = strnodes & getindent (intLevel) & " & lt font> "'blue <
Strnodes = strnodes & " "& nodnode.nodename &" font> "'Brown Node Name
'Display properties
Set nodattriist = nodnode.attributes' Get the property node set (Collection - one of my favorite data types)
INTCOUNT = NODATTRLIST.LENGTH 'Collection Length, convenient? :)
IF Intcount> 0 THEN
For intatTR = 0 to intcount-1
'Red attribute name, blue quotation mark
Strnodes = strnodes & ""> nodattrlist (intattr) .NodeName font> = " < font> "& nodattrlist INTATTR) .NodeValue & " "" font> "
NEXT
END IF
'Handling child nodes of current nodes
Intcount = nodnode.childnodes.length
IF Intcount> 0 Then 'If there is a child node
Strnodes = strnodes & " & gt font>
"" 'attribute is displayed, ">" closed TAG first
'Recursive renderchildNodes for each child node
For intNode = 0 to intcount-1
Strnodes = strnodes & renderchildNodes (Nodnode.childNodes (intNode), Intlevel 1)
NEXT
'Display Close Tag NODENAME>
Strnodes = strnodes & getindent (intlevel) & " & lt / font> nodnode.nodeename & " font> & gt font>
" ELSE
Strnodes = strnodes & " / & gt font>
"No child node, display" /> "
END IF
End SELECT
RenderChildNodes = strnodes
END FUNCTION
'Coloring the comment node
Function rendercomment (nodnode, intledel)
DIM STRNODES, INTCOUNT, INTNODE
Strnodes = ""
INTCOUNT = 0
INTNODE = 0
Dim nodattrlist
Strnodes = strnodes & getindent (intLevel) & " & lt! - "
Strnodes = strnodes & nodnode.nodevalue
Strnodes = Strnodes & "- & gt font>
Rendercomment = Strnodes
END FUNCTION