|  | 
Chilkat  HOME  Android™  AutoIt  C  C#  C++  Chilkat2-Python  CkPython  Classic ASP  DataFlex  Delphi DLL  Go  Java  Node.js  Objective-C  PHP Extension  Perl  PowerBuilder  PowerShell  PureBasic  Ruby  SQL Server  Swift  Tcl  Unicode C  Unicode C++  VB.NET  VBScript  Visual Basic 6.0  Visual FoxPro  Xojo Plugin
| (Unicode C) Load XML from a Remote URLDemonstrates how to load XML from a remote URL, such as https://www.chilkatsoft.com/hamlet.xml 
 #include <C_CkHttpW.h> #include <C_CkStringBuilderW.h> #include <C_CkXmlW.h> void ChilkatSample(void) { HCkHttpW http; HCkStringBuilderW sbXml; BOOL success; HCkXmlW xml; // This example assumes the Chilkat HTTP API to have been previously unlocked. // See Global Unlock Sample for sample code. http = CkHttpW_Create(); sbXml = CkStringBuilderW_Create(); // Download the XML from the URL into sbXml success = CkHttpW_QuickGetSb(http,L"https://www.chilkatsoft.com/hamlet.xml",sbXml); if (success == FALSE) { wprintf(L"%s\n",CkHttpW_lastErrorText(http)); CkHttpW_Dispose(http); CkStringBuilderW_Dispose(sbXml); return; } xml = CkXmlW_Create(); // Load the XML contained in sbXml success = CkXmlW_LoadSb(xml,sbXml,TRUE); if (success == FALSE) { wprintf(L"%s\n",CkXmlW_lastErrorText(xml)); CkHttpW_Dispose(http); CkStringBuilderW_Dispose(sbXml); CkXmlW_Dispose(xml); return; } wprintf(L"Success.\n"); CkHttpW_Dispose(http); CkStringBuilderW_Dispose(sbXml); CkXmlW_Dispose(xml); } | ||||||
© 2000-2025 Chilkat Software, Inc. All Rights Reserved.