ElementImpl elem = new ElementImpl((DocumentImpl) parentElem
.getOwnerDocument(), localName, (NamespaceImpl) ns, builder);
parentElem.appendChild(elem);
return elem;
case Node.DOCUMENT_NODE:
DocumentImpl docImpl = (DocumentImpl) parent;
ElementImpl elem2 = new ElementImpl(docImpl, localName,
(NamespaceImpl) ns, builder);
docImpl.appendChild(elem2);
return elem2;
case Node.DOCUMENT_FRAGMENT_NODE:
DocumentFragmentimpl docFragImpl = (DocumentFragmentimpl) parent;
ElementImpl elem3 = new ElementImpl((DocumentImpl) docFragImpl