I'm trying to convert a html input to new html output. Example:
<!DOCTYPE html>
<html lang="en">
<!-- This is a comment -->
<head>
<meta charset="UTF-8">
<title>Example App title</title>
</head>
<body>
This is the example app.
</body>
</html>
I want to change the title attribute. So the new output becomes:
<!DOCTYPE html>
<html lang="en">
<!-- This is a comment -->
<head>
<meta charset="UTF-8">
<title>The real title</title>
</head>
<body>
This is the example app.
</body>
</html>
Any pointers on which crate I should use or maybe examples?
I came so far with this playground gist: Rust Playground see the fixme on line 17
No, I can't generate the html. It is what users upload and I need to make some changes to them. The title field is just an example to keep it simple. But if I can change the title I can do the rest to.