Chilkat HOME .NET Core C# Android™ AutoIt C C# C++ Chilkat2-Python CkPython Classic ASP DataFlex Delphi ActiveX Delphi DLL Go Java Lianja Mono C# Node.js Objective-C PHP ActiveX PHP Extension Perl PowerBuilder PowerShell PureBasic Ruby SQL Server Swift 2 Swift 3,4,5... Tcl Unicode C Unicode C++ VB.NET VBScript Visual Basic 6.0 Visual FoxPro Xojo Plugin
(DataFlex) Load XML from a Remote URLDemonstrates how to load XML from a remote URL, such as https://www.chilkatsoft.com/hamlet.xml
Use ChilkatAx-win32.pkg Procedure Test Handle hoHttp Variant vSbXml Handle hoSbXml Boolean iSuccess Handle hoXml String sTemp1 // This example assumes the Chilkat HTTP API to have been previously unlocked. // See Global Unlock Sample for sample code. Get Create (RefClass(cComChilkatHttp)) To hoHttp If (Not(IsComObjectCreated(hoHttp))) Begin Send CreateComObject of hoHttp End Get Create (RefClass(cComChilkatStringBuilder)) To hoSbXml If (Not(IsComObjectCreated(hoSbXml))) Begin Send CreateComObject of hoSbXml End // Download the XML from the URL into sbXml Get pvComObject of hoSbXml to vSbXml Get ComQuickGetSb Of hoHttp "https://www.chilkatsoft.com/hamlet.xml" vSbXml To iSuccess If (iSuccess = False) Begin Get ComLastErrorText Of hoHttp To sTemp1 Showln sTemp1 Procedure_Return End Get Create (RefClass(cComChilkatXml)) To hoXml If (Not(IsComObjectCreated(hoXml))) Begin Send CreateComObject of hoXml End // Load the XML contained in sbXml Get pvComObject of hoSbXml to vSbXml Get ComLoadSb Of hoXml vSbXml True To iSuccess If (iSuccess = False) Begin Get ComLastErrorText Of hoXml To sTemp1 Showln sTemp1 Procedure_Return End Showln "Success." End_Procedure |
© 2000-2024 Chilkat Software, Inc. All Rights Reserved.