![]()  | 
  
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
 
      (DataFlex) Download HTML from URL and Convert to XMLDownloads an HTML page from a URL and converts it to XML. 
 Use ChilkatAx-win32.pkg Procedure Test Handle hoGlob Boolean iSuccess Handle hoHttp String sHtml Handle hoHtmlToXml String sXml String sTemp1 Boolean bTemp1 // Note: This example requires the Chilkat Bundle license. // Any string argument automatically begins the 30-day trial. Get Create (RefClass(cComChilkatGlobal)) To hoGlob If (Not(IsComObjectCreated(hoGlob))) Begin Send CreateComObject of hoGlob End Get ComUnlockBundle Of hoGlob "30-day trial" To iSuccess If (iSuccess <> True) Begin Get ComLastErrorText Of hoGlob To sTemp1 Showln sTemp1 Procedure_Return End Get Create (RefClass(cComChilkatHttp)) To hoHttp If (Not(IsComObjectCreated(hoHttp))) Begin Send CreateComObject of hoHttp End Get ComQuickGetStr Of hoHttp "http://www.intel.com/" To sHtml Get ComLastMethodSuccess Of hoHttp To bTemp1 If (bTemp1 <> True) Begin Get ComLastErrorText Of hoHttp To sTemp1 Showln sTemp1 Procedure_Return End Get Create (RefClass(cComChilkatHtmlToXml)) To hoHtmlToXml If (Not(IsComObjectCreated(hoHtmlToXml))) Begin Send CreateComObject of hoHtmlToXml End // Indicate the charset of the output XML we'll want. Set ComXmlCharset Of hoHtmlToXml To "utf-8" // Set the HTML: Set ComHtml Of hoHtmlToXml To sHtml // Convert to XML: Get ComToXml Of hoHtmlToXml To sXml // Save the XML to a file. // Make sure your charset here matches the charset // used for the XmlCharset property. Get ComWriteStringToFile Of hoHtmlToXml sXml "qa_output/out.xml" "utf-8" To iSuccess Showln "Finished." End_Procedure  | 
  ||||
© 2000-2025 Chilkat Software, Inc. All Rights Reserved.