}
case Node.DOCUMENT_NODE: {
DocumentImpl docImpl = (DocumentImpl) parent;
ElementImpl elem = new ElementImpl(docImpl, localName,
(OMNamespaceImpl) ns, this);
docImpl.appendChild(elem);
return elem;
}
case Node.DOCUMENT_FRAGMENT_NODE:
DocumentFragmentImpl docFragImpl = (DocumentFragmentImpl) parent;
return new ElementImpl((DocumentImpl) docFragImpl