I have found code to use the MS XML parser 3.0 as you can see below. What I want to do this be able to load and parse the XML file from a given URL. I simiply gave the .load function a URL string. But this does not work. How do I go about this?
Code:
Private Sub Form_Load()
Dim objDoc As MSXML2.DOMDocument30
Dim objNodeList As MSXML2.IXMLDOMNodeList
Dim objNode As MSXML2.IXMLDOMNode
Set objDoc = New MSXML2.DOMDocument30
If objDoc.Load("[URL unfurl="true"]http://www.someserver.com/customerdata.xml")[/URL] Then
If Not objDoc Is Nothing Then
Set objNodeList = objDoc.selectNodes("customerdata/customer/firstname")
If Not objNodeList Is Nothing Then
'Loop though each node in the node list
For Each objNode In objNodeList
Text1.Text = Text1.Text + vbCrLf + objNode.Text
Next
End If
End If
End If
End Sub