nipper_trunk/
lib.rs

1//! HTML manipulation with CSS selectors.
2//!
3//! # Features
4//!
5//! * Iteration
6//! * Manipulation
7//! * Property
8//! * Query
9//! * Traversal
10//!
11//! # Get started
12//!
13//! ```
14//! use nipper::Document;
15//!
16//! let html = r#"<div>
17//!     <a href="/1">One</a>
18//!     <a href="/2">Two</a>
19//!     <a href="/3">Three</a>
20//! </div>"#;
21//!
22//! let document = Document::from(html);
23//! let a = document.select("a:nth-child(3)");
24//! let text: &str = &a.text();
25//! assert!(text == "Three");
26//! ```
27//!
28
29// #![deny(missing_docs)] // TODO: document NodeRef & methods.
30mod document;
31mod dom_tree;
32mod element;
33mod manipulation;
34mod matcher;
35mod property;
36mod query;
37mod selection;
38mod traversal;
39
40pub use document::Document;
41pub use dom_tree::Node;
42#[doc(hidden)]
43pub use dom_tree::NodeId;
44pub use dom_tree::NodeRef;
45#[doc(hidden)]
46pub use dom_tree::SerializableNodeRef;
47pub use matcher::Matcher;
48pub use selection::Selection;
49pub use traversal::Selections;