Tcl
Tcl
Convert HTML File to XML File
See more HTML-to-XML/Text Examples
Convert HTML file to XML file.Chilkat Tcl Downloads
load ./chilkat.dll
set success 0
# This example assumes the Chilkat API to have been previously unlocked.
# See Global Unlock Sample for sample code.
set htmlToXml [new_CkHtmlToXml]
# Indicate the charset of the output XML we'll want.
CkHtmlToXml_put_XmlCharset $htmlToXml "utf-8"
set success [CkHtmlToXml_ConvertFile $htmlToXml "test.html" "out.xml"]
if {$success != 1} then {
puts [CkHtmlToXml_lastErrorText $htmlToXml]
} else {
puts "Success"
}
delete_CkHtmlToXml $htmlToXml