Closed LeMoussel closed 1 year ago
I found this solution :
let html_file = Path::new("cocon1.html").to_path_buf();
let document = kuchiki::parse_html().from_utf8().from_file(&html_file).unwrap();
println!("{}", document.to_string());
@LeMoussel Thank you so very much. I have been trying to find a "tutorial" to read and parse an HTML file in Rust for quite some time and those three lines (plus a few use and extern crate) did the job. So thankful.
I will soon archive this repository and make it read-only, so this issue will not be addressed: https://github.com/kuchiki-rs/kuchiki#archived
tried to use kuchiki like this
But I got his error
Rem : Wiith
htm5ever
, It's OK with this code: