Skip to main content

parse_html_str_with_recovered

Function parse_html_str_with_recovered 

Source
pub fn parse_html_str_with_recovered(
    input: &str,
    opts: &HtmlParseOptions,
) -> (Result<Document, XmlError>, Vec<XmlError>)
Expand description

Parse an HTML document from a string, returning both the document and the list of recovered well-formedness errors. The document is returned even if errors were recovered; callers can inspect the Vec<XmlError> to see what was repaired.

In strict mode (recovery_mode: false), the first error becomes fatal and is returned via the Result.