node-html-parser 0.1.1

Fast HTML parser for Rust & WASM producing a lightweight DOM with CSS selector querying.
Documentation
1
2
3
4
5
6
7
8
9
10
11
use node_html_parser::parse;

#[test]
fn issue_214_table_tagname_uppercase() {
	let html = std::fs::read_to_string("tests/assets/html/codes.html").expect("codes.html");
	let root = parse(&html);
	let table = root
		.query_selector("table.restable")
		.expect("table.restable");
	assert_eq!(table.name().to_ascii_uppercase(), "TABLE");
}