private void copyTopLevelElement(Element e, Element parent) { if (e.getNamespaceURI() == null) { switch (e.getLocalName()) { case "summary": case "remarks": case "value": case "returns": case "example": parent.appendChild(copyContainer(e)); break; case "include": include(e, parent, false); break; case "exception": parent.appendChild(copyException(e)); break; case "param": parent.appendChild(copyParam(e)); break; case "typeparam": parent.appendChild(copyTypeparam(e)); break; case "seealso": parent.appendChild(copySeealso(e)); break; case "code": default: parent.appendChild((Element)document.importNode(e, true)); break; } } else { parent.appendChild((Element)document.importNode(e, true)); } }
private void copyNestedElement(Element nested, Element parent) { if (nested.getNamespaceURI() == null) { switch (nested.getLocalName()) { case "c": case "para": case "list": case "listheader": case "item": case "term": case "description": parent.appendChild(copyContainer(nested)); break; case "include": include(nested, parent, true); break; case "see": parent.appendChild(copySee(nested)); break; case "paramref": parent.appendChild(copyParamref(nested)); break; case "typeparamref": parent.appendChild(copyTypeparamref(nested)); break; default: parent.appendChild((Element)document.importNode(nested, true)); break; } } else { parent.appendChild((Element)document.importNode(nested, true)); } }