Firstly let me confess that I've only used XML with java sax parsers

My instincts tell me that looping within the same loop doesn't seem quite right...

especially if there is only expected to be one firstname and one lastname per person.

Code:
For Each Child2 In Child.childNodes
         If Child2.nodeName = "LastName" And Child2.Text = TextLastName Then
             For Each Child3 In Child.childNodes
                If Child3.nodeName = "FirstName" Then
                 ListFirstName.AddItem Child3.Text
                End If
             Next Child3
         End If
     Next Child2
I would have thought holding the strings in a couple of variables would be better


Code:
Dim lastname As String
Dim firstname As String
For Each Child In xmlRoot.childNodes
  If Child.nodeName = "Person" Then
    For Each Child2 In Child.childNodes
      If Child2.nodeName = "LastName" Then
        lastname = Child2.Text
      End If
      If Child2.nodeName = "FirstName" Then
        firstname = Child2.Text
      End If
      
    Next Child2
    If lastname = TextLastName Then
      ListFirstName.AddItem firstname
    End If
    lastname = "": firstname = ""
    
  Else
  MsgBox "Node name: " & Child.nodeName, , "Non person!"
  End If
Next Child