XML query vb6

Hi everyone!
I am trying to convert a method made in vb6 to xojo.
Could you please tell me if i am doing this right?

The original vb6 code is:

MuestraNodosCancelacion (ByRef Nodos As XmlNodeList) Dim i As Integer 'ReDim ListaUUIDCancelacion(1) Dim oNodo As MSXML2.IXMLDOMNode For Each oNodo In Nodos If oNodo.nodeName = "cfdi:Comprobante" Then If oNodo.hasChildNodes Then MuestraNodosCancelacion oNodo.childNodes End If ElseIf oNodo.nodeName = "cfdi:Emisor" Then For i = 0 To oNodo.Attributes.length - 1 If oNodo.Attributes(i).baseName = "rfc" Then EmisorCancelacionRFC = oNodo.Attributes(i).Text End If Next i ElseIf oNodo.nodeName = "cfdi:Complemento" Then If oNodo.hasChildNodes Then MuestraNodosCancelacion oNodo.childNodes End If ElseIf oNodo.nodeName = "tfd:TimbreFiscalDigital" Then For i = 0 To oNodo.Attributes.length - 1 If oNodo.Attributes(i).baseName = "UUID" Then ListaUUIDCancelacion = oNodo.Attributes(i).Text End If Next i End If Next oNodo

The code i made in xojo is:

[code] MuestraNodosCancelacion (ByRef Nodos As XmlNodeList)
Dim oNodo As XmlNode
Dim attributeNode As XmlAttribute

Dim node As XmlNode
For i As Integer = 0 To Nodos.Length-1
node = Nodos.Item(i)
if node.Name = “cfdi:Comprobante” then
If node.ChildCount > 0 Then
MuestraNodosCancelacion Nodos.Xql(“child::cfdi:Comprobante”)
End If
ElseIf node.Name = “cfdi:Emisor” Then
EmisorCancelacionRFC = node.GetAttribute(“rfc”)
ElseIf node.Name = “cfdi:Complemento” Then
If node.ChildCount > 0 Then
MuestraNodosCancelacion Nodos.Xql(“child::cfdi:Complemento”)
End If
ElseIf node.Name = “tfd:TimbreFiscalDigital” Then
ListaUUIDCancelacion = node.GetAttribute(“UUID”)
end if
Next[/code]

Yes is right,but you can try the XQL ?
XQL
this is from example

[code]// Display all the Player names
Dim nodes As XmlNodeList
nodes = xml.XQL("//Player") // Find all Player nodes in XML

// Loop through results and display each name attribute
Dim node As XmlNode
For i As Integer = 0 To nodes.Length-1
node = nodes.Item(i)
MsgBox("Player: " + node.GetAttribute(“name”))
Next[/code]