Expand description
HTML manipulation with CSS selectors.
§Features
- Iteration
- Manipulation
- Property
- Query
- Traversal
§Get started
use nipper::Document;
let html = r#"<div>
<a href="/1">One</a>
<a href="/2">Two</a>
<a href="/3">Three</a>
</div>"#;
let document = Document::from(html);
let a = document.select("a:nth-child(3)");
let text: &str = &a.text();
assert!(text == "Three");
Structs§
- Document represents an HTML document to be manipulated.
- CSS selector.
- Selection represents a collection of nodes matching some criteria. The initial Selection object can be created by using [
Document::select
], and then manipulated using methods itself. - Iterator over a collection of matched elements.
Type Aliases§
- Alias for
NodeRef
.