1use parsercher;
2
3fn main() {
4 let html = r#"
5<!DOCTYPE html>
6<html>
7 <head>
8 <meta charset="UTF-8">
9 <title>sample html</title>
10 </head>
11 <body>
12 <h1>Hello, world!</h1>
13
14 <div
15 id="content"></div>
16
17 <ol>
18 <li>first</li>
19 <li>second</li>
20 <li>therd</li>
21 </ol>
22 <!-- All script code becomes one text -->
23<script>
24 let content = document.getElementById('content');
25 content.textContent = 'content';
26</script>
27 </body>
28</html>
29"#;
30 if let Ok(dom) = parsercher::parse(&html) {
31 println!("{:#?}", dom);
32 }
33}