htmlgrep 0.3.1

htmlgrep is a suite of tools for searching HTML documents
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
extern crate htmlgrep;

fn main() {
	let input = r#"
		<!doctype html>
		<meta charset=utf>
		<title>My first blog post</title>
		<meta name=keywords content=blog,first,hello>
		<meta name=description content="First entry to blog.">
	"#;

	let matches = htmlgrep::select("meta[name=keywords]", input.as_bytes()).unwrap();

	for node in matches {
		println!("{}", node.source);
	}
}