html_forge
A robust and efficient HTML parsing library for Rust
π Features
Element Parsing
: Easily parse HTML elements with attributes and nested children.Text Parsing
: Extract and manage text nodes within your documents.Attribute Parsing
: Handle element attributes with both single and double quotes.Comment Parsing
: Parse comments safely, even those with special characters or nested hyphens.Error Handling
: Gracefully manage parsing errors such as mismatched tags and unexpected end-of-file (EOF).
π¦ Installation
To use html_forge
, add the following to your Cargo.toml:
[]
= "0.1.0"
Usage
1. Basic Parsing Example:
Hereβs how you can parse a simple HTML snippet using html_forge:
use Parser;
use Node;
2. Handling Errors:
html_forge gracefully handles common errors during parsing:
use ;
π§ͺ Testing
To run the tests, use:
π₯ Contributing
Contributions are welcome! Feel free to open issues, submit pull requests, or fork the repository to make improvements.
π License
This library is open-source and available under the MIT LICENSE.
Happy forging with html_forge! π οΈπ