Rust
Rust
Convert HTML File to XML File
See more HTML-to-XML/Text Examples
Convert HTML file to XML file.Chilkat Rust Downloads
// This example assumes the Chilkat API to have been previously unlocked.
// See Global Unlock Sample for sample code.
let html_to_xml = chilkat::HtmlToXml::new();
// Indicate the charset of the output XML we'll want.
html_to_xml.set_xml_charset("utf-8");
if html_to_xml.convert_file("test.html", "out.xml").is_err() {
println!("{}", html_to_xml.last_error_text());
} else {
println!("Success");
}