I am successfully parse an xml file with this code.
The code is returning all value for the normal tags, but not for the lists.
IE: I get all the value for 1,2,3 & 5 but never for 4
Hope this is clear enough

Code:
Public Function GetNodeValue(ByRef Nodes As MSXML2.IXMLDOMNodeList) As String
Dim xNode As MSXML2.IXMLDOMNode
For Each xNode In Nodes
If xNode.nodeType = NODE_TEXT Then
GetNodeValue = xNode.parentNode.nodeName & ":" & xNode.nodeValue
Select Case xNode.parentNode.nodeName
Case "1"
Debug.Print xNode.nodeValue
Case "2"
Debug.Print xNode.nodeValue
Case "3"
Debug.Print xNode.nodeValue
Case Else
'This line never returns a value
Debug.Print xNode.nodeValue
End Select
End If
If xNode.hasChildNodes Then
GetNodeValue xNode.childNodes
End If
Next
Set xNode = Nothing
End Function
Here is an example of the XML:
Code:
 <domain:STUFF>
<1>00000000000017</1>
<2>000</2>
<3>Hmmmmm</3>
<4>
<domain:flag sysid="2"/>
</4>
<5>1.000</5>
</domain:STUFF>
<domain:STUFF>
<1>00000000000020</1>
<2>000</2>
<3>BOB2</3>
<4>
<domain:flag sysid="2"/>
<domain:flag sysid="4"/>
<domain:flag sysid="5"/>
<domain:flag sysid="6"/>
<domain:flag sysid="7"/>
<domain:flag sysid="8"/>
</4>
<5>1.000</5>
</domain:STUFF>