Warning
This repository has been deprecated, please use the html-editor instead.
If you want to have the ownership of this crate name, please contact me at lomirus@qq.com so I can transfer it to you.
HTML Query Parser
Pure, simple and elegant HTML parser and query selector.
Examples
Parse HTML segment/document
let document = parse;
println!;
Output:
Query an element by classname
// let html = r#"..."#
let nodes = parse;
let selector: Selector = from;
let element: Element = nodes.query.unwrap;
Query all elements by tag
// let html = r#"..."#
let nodes = parse;
let selector: Selector = from;
let elements: = nodes.query_all;
Edit the HTML
// let html = r#"..."#
let a: String = parse.trim.html;
let b: String = parse.insert_to.html;
let c: String = parse.remove_by.html;
You can find more examples in the documentation.
Changelog
See in CHANGELOG.md