AutoIt
AutoIt
Load XML from a Remote URL
Demonstrates how to load XML from a remote URL, such as https://www.chilkatsoft.com/hamlet.xmlChilkat AutoIt Downloads
Local $bSuccess = False
; This example assumes the Chilkat HTTP API to have been previously unlocked.
; See Global Unlock Sample for sample code.
$oHttp = ObjCreate("Chilkat.Http")
$oSbXml = ObjCreate("Chilkat.StringBuilder")
; Download the XML from the URL into sbXml
$bSuccess = $oHttp.QuickGetSb("https://www.chilkatsoft.com/hamlet.xml",$oSbXml)
If ($bSuccess = False) Then
ConsoleWrite($oHttp.LastErrorText & @CRLF)
Exit
EndIf
$oXml = ObjCreate("Chilkat.Xml")
; Load the XML contained in sbXml
$bSuccess = $oXml.LoadSb($oSbXml,True)
If ($bSuccess = False) Then
ConsoleWrite($oXml.LastErrorText & @CRLF)
Exit
EndIf
ConsoleWrite("Success." & @CRLF)