dom-tree-rs 0.2.1

Tiny, zero-dependency, forgiving HTML parser: turn messy real-world HTML into a clean DOM tree (and JSON). WASM-first, no_std-friendly.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
//! Serialization of the tree.
//!
//! - [`Dom::to_html`](crate::Dom::to_html) / [`NodeRef::to_html`](crate::NodeRef::to_html)
//!   re-serialize the tree back to HTML — always available, zero-dependency.
//! - The default [`json`](crate#features) feature adds the hand-rolled,
//!   zero-dependency [`Dom::to_json`](crate::Dom::to_json).
//! - The optional `serde` feature adds `serde::Serialize` impls that produce the
//!   **same** JSON shape (pinned by a roundtrip test).

mod html;

#[cfg(feature = "json")]
mod json;

#[cfg(feature = "serde")]
mod serde_impl;