Parse & DOM¶
Turn markup into a tree, then read, edit, and walk it.
- Parse HTML into a tree
- Parse XML into a tree
- Tokenize HTML
- Parse with SAX callbacks
- Parse into your own tree
- Rewrite HTML without building a tree
- Edit the tree
- Inspect a node you already hold
- Work with ranges of the tree
- Observe tree mutations
- Use the Shadow DOM
- Work with forms
- Migrate from html.parser.HTMLParser