原文
import parserino;
void main()
{
Document doc = "<html>超文";
assert(doc.toString() == "<html><head></head><body>超文本</body></html>");
doc.title = "你好";
assert(doc.toString() == "<html><head><title>你好,世界</title></head><body>超文本</body></html>");
doc.body.appendChild(`
<a href="/first.html">first</a>
<div>
<a id="tochange" href="/second.html">second</a>
</div>
`.asFragment
);
auto newElement = doc.createElement("a");
newElement.setAttribute("href", "third.html");
newElement.innerText("third");
doc.body.appendChild(newElement);
doc
.bySelector("div a")
.frontOrThrow
.innerText="changed!";
assert(doc.body.byId("tochange").innerText == "changed!");
}