Module parser

Source
Expand description

This module contains functions which parsees HTML string into a custom Node struct.

The Node struct is used to represent the HTML elements and their children in a tree-like structure.

With the safe_parse_html function, malformed HTML will return an error instead of panicking. The parse_html function is a wrapper around safe_parse_html that panics if the input is malformed. However, it is deprecated and will be removed in future versions.

Enums§

MalformedAttributeError
Errors that will be returned when parsing malformed HTML attributes
MalformedTagError
Errors that will be returned when parsing malformed HTML tags
ParseHTMLError
Errors that can occur when parsing HTML

Functions§

parse_htmlDeprecated
Parses a string of HTML into a Node struct
safe_parse_html
Safely parses a string of HTML into a Node struct