parse

Function parse 

Source
pub fn parse(html: &str) -> Document
Expand description

Parse an HTML document string into a Document.

This handles the full document including doctype, html, head, and body elements.

ยงExample

use ironhtml_parser::parse;

let doc = parse("<!DOCTYPE html><html><head><title>Test</title></head><body><p>Hello</p></body></html>");
assert!(doc.doctype.is_some());
assert!(!doc.root.children.is_empty());