public Jerry wrap(String html) {
final Document doc = builder.parse(html);
for (Node node : nodes) {
Document workingDoc = doc.clone();
Node inmostNode = workingDoc;
while (inmostNode.hasChildNodes()) {
inmostNode = inmostNode.getFirstChild();
}
// replace
Node parent = node.getParentNode();
int index = node.getSiblingIndex();
inmostNode.addChild(node);
parent.insertChild(workingDoc.getFirstChild(), index);
}
return this;
}