Sample code for 30+ languages & platforms
Visual Basic 6.0

Load XML from a Remote URL

Demonstrates how to load XML from a remote URL, such as https://www.chilkatsoft.com/hamlet.xml

Chilkat Visual Basic 6.0 Downloads

Visual Basic 6.0
Dim success As Long
success = 0

' This example assumes the Chilkat HTTP API to have been previously unlocked.
' See Global Unlock Sample for sample code.

Dim http As New ChilkatHttp
Dim sbXml As New ChilkatStringBuilder

' Download the XML from the URL into sbXml
success = http.QuickGetSb("https://www.chilkatsoft.com/hamlet.xml",sbXml)
If (success = 0) Then
    Debug.Print http.LastErrorText
    Exit Sub
End If

Dim xml As New ChilkatXml

' Load the XML contained in sbXml
success = xml.LoadSb(sbXml,1)
If (success = 0) Then
    Debug.Print xml.LastErrorText
    Exit Sub
End If

Debug.Print "Success."