htmlstream 0.1.1

Lightweight HTML parser for rust
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
extern crate htmlstream;
use htmlstream::*;

fn main() {
    let html = "this is a test: <a href=\"http://rust-lang.org\">The Rust Programing Language</a>";
    for (pos, tag) in tag_iter(html) {
        println!("{:?} {:?}", pos, tag);
        for (pos, attr) in attr_iter(&tag.attributes) {
            println!("    {:?} {:?}", pos, attr);
        }
    }
}