final BranchElement p1 = createBranch(body);
p1.addAttribute(ELEMENT_NAME, "p1");
final LeafElement content1 = createLeaf(p1, 1, 5);
content1.addAttribute(ELEMENT_NAME, "leaf1");
final LeafElement content2 = createLeaf(p1, 5, 6);
content2.addAttribute(ELEMENT_NAME, "leaf2");
implied.replace(0, 0, new Element[] { content0 });
p1.replace(0, 0, new Element[] { content1, content2 });
head.replace(0, 0, new Element[] { implied });
body.replace(0, 0, new Element[] { p1 });
html.replace(0, 1, new Element[] { head, body });