Ver Mensaje Individual
  #6 (permalink)  
Antiguo 05/11/2008, 09:51
el_avion
 
Fecha de Ingreso: noviembre-2008
Mensajes: 2
Antigüedad: 16 años, 6 meses
Puntos: 0
Respuesta: Xml Y Visual Basic 6.0

Funciona agregando la referencia microsoft XML V2.0

Este es el codigo Corregido ya quel anterior cuenta con algunos errores:

Private Function leerXML() As String
Dim oParser As MSXML.DOMDocument
Set oParser = New MSXML.DOMDocument
If oParser.Load("C:\configuracion.xml") Then
MuestraNodos oParser.childNodes
Else
MsgBox "Ha ocurrido un error."
End If

End Function

Public Sub MuestraNodos(ByRef Nodos As MSXML.IXMLDOMNodeList)

Dim oNodo As MSXML.IXMLDOMNode
For Each oNodo In Nodos
If oNodo.nodeType = NODE_TEXT Then
MsgBox oNodo.parentNode.nodeName & "=" & oNodo.nodeValue
End If
If oNodo.hasChildNodes Then
MuestraNodos oNodo.childNodes
End If
Next oNodo
End Sub