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
(PowerBuilder) Download HTML from URL and Convert to XMLDownloads an HTML page from a URL and converts it to XML.
integer li_rc oleobject loo_Glob integer li_Success oleobject loo_Http string ls_Html oleobject loo_HtmlToXml string ls_Xml // Note: This example requires the Chilkat Bundle license. // Any string argument automatically begins the 30-day trial. loo_Glob = create oleobject // Use "Chilkat_9_5_0.Global" for versions of Chilkat < 10.0.0 li_rc = loo_Glob.ConnectToNewObject("Chilkat.Global") if li_rc < 0 then destroy loo_Glob MessageBox("Error","Connecting to COM object failed") return end if li_Success = loo_Glob.UnlockBundle("30-day trial") if li_Success <> 1 then Write-Debug loo_Glob.LastErrorText destroy loo_Glob return end if loo_Http = create oleobject // Use "Chilkat_9_5_0.Http" for versions of Chilkat < 10.0.0 li_rc = loo_Http.ConnectToNewObject("Chilkat.Http") ls_Html = loo_Http.QuickGetStr("http://www.intel.com/") if loo_Http.LastMethodSuccess <> 1 then Write-Debug loo_Http.LastErrorText destroy loo_Glob destroy loo_Http return end if loo_HtmlToXml = create oleobject // Use "Chilkat_9_5_0.HtmlToXml" for versions of Chilkat < 10.0.0 li_rc = loo_HtmlToXml.ConnectToNewObject("Chilkat.HtmlToXml") // Indicate the charset of the output XML we'll want. loo_HtmlToXml.XmlCharset = "utf-8" // Set the HTML: loo_HtmlToXml.Html = ls_Html // Convert to XML: ls_Xml = loo_HtmlToXml.ToXml() // Save the XML to a file. // Make sure your charset here matches the charset // used for the XmlCharset property. li_Success = loo_HtmlToXml.WriteStringToFile(ls_Xml,"qa_output/out.xml","utf-8") Write-Debug "Finished." destroy loo_Glob destroy loo_Http destroy loo_HtmlToXml |
© 2000-2024 Chilkat Software, Inc. All Rights Reserved.