Sample code for 30+ languages & platforms
VB.NET

Load XML from a Remote URL

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

Chilkat VB.NET Downloads

VB.NET
Dim success As Boolean = False

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

Dim http As New Chilkat.Http
Dim sbXml As New Chilkat.StringBuilder

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


Dim xml As New Chilkat.Xml

' Load the XML contained in sbXml
success = xml.LoadSb(sbXml,True)
If (success = False) Then
    Debug.WriteLine(xml.LastErrorText)
    Exit Sub
End If


Debug.WriteLine("Success.")