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) 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-2024 Chilkat Software, Inc. All Rights Reserved.