domq 0.5.0

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
<!doctype html>
<html lang="en">
<head>
  <meta charset="utf-8">
  <title>Tom &amp; Jerry</title>
  <style>body { color: #333; } a::before { content: '<'; }</style>
</head>
<body>
  <!-- main content -->
  <h1 id="title">Hello &mdash; world &#169; 2026</h1>
  <a href="/path?x=1&amp;y=2" data-id='42'>link</a>
  <input type="text" disabled required>
  <script>if (a < b && c > 0) { render("<div>"); }</script>
</body>
</html>