Node node = parent.getFirstChild();
while (node != null) {
Node thisNode = node;
node = node.getNextSibling();
parent.removeChild(thisNode);
aElement.appendChild(thisNode);
}
parent.appendChild(aElement);
return TextHyperlink.getInstanceof(aElement);
}