/** * write the descriptor class to a DOM tree and return it * * @param parent node for the DOM tree * @param descriptor the descriptor to write * @return the DOM tree top node */ public Node writeDescriptor(Node parent, T descriptor) { Node bundleNode; if (getDocType()==null) { // we are using schemas for this DDs bundleNode = appendChildNS(parent, getXMLRootTag().getQName(), TagNames.JAVAEE_NAMESPACE); addBundleNodeAttributes((Element) bundleNode, descriptor); } else { bundleNode = appendChild(parent, getXMLRootTag().getQName()); } appendTextChild(bundleNode, topLevelTagName(), topLevelTagValue(descriptor)); // description, display-name, icons... writeDisplayableComponentInfo(bundleNode, descriptor); return bundleNode; }