PowerBuilder
PowerBuilder
Convert HTML File to XML File
See more HTML-to-XML/Text Examples
Convert HTML file to XML file.Chilkat PowerBuilder Downloads
integer li_rc
integer li_Success
oleobject loo_HtmlToXml
li_Success = 0
// This example assumes the Chilkat API to have been previously unlocked.
// See Global Unlock Sample for sample code.
loo_HtmlToXml = create oleobject
li_rc = loo_HtmlToXml.ConnectToNewObject("Chilkat.HtmlToXml")
if li_rc < 0 then
destroy loo_HtmlToXml
MessageBox("Error","Connecting to COM object failed")
return
end if
// Indicate the charset of the output XML we'll want.
loo_HtmlToXml.XmlCharset = "utf-8"
li_Success = loo_HtmlToXml.ConvertFile("test.html","out.xml")
if li_Success <> 1 then
Write-Debug loo_HtmlToXml.LastErrorText
else
Write-Debug "Success"
end if
destroy loo_HtmlToXml