TagSoup
=======
[](https://opensource.org/licenses/MIT)
[](https://crates.io/crates/tagsoup)
[](https://docs.rs/tagsoup)
[](https://github.com/CasualX/tagsoup/actions)
[TagSoup](https://en.wikipedia.org/wiki/Tag_soup) is a simple HTML parser written in Rust.
It is however, very fast.
It attempts to parse HTML tag soup as best as it can.
It is not a full HTML parser, but it should be able to handle most HTML documents.
Loosly based on [HTML Living Standard](https://html.spec.whatwg.org/multipage/syntax.html).
Usage
-----
```rust
// Parse an HTML fragment.
let doc = tagsoup::Document::parse("<div><p id=here>Hello, world!</p></div>");
// Check for parsing errors.
assert!(doc.errors.is_empty());
// Query the document for an element using a CSS selector.
let element = doc.query_selector("#here").unwrap();
assert_eq!(element.text_content(), "Hello, world!");
```
📜 License
----------
Licensed under [MIT License](https://opensource.org/licenses/MIT), see [license.txt](license.txt).
### Contribution
Unless you explicitly state otherwise, any contribution intentionally submitted
for inclusion in the work by you, shall be licensed as above, without any additional terms or conditions.