private Node appendChild(NodeImpl last, Node child) throws DOMException {   switch (child.getNodeType()) { case Node.PROCESSING_INSTRUCTION_NODE : final ProcessingInstructionImpl pi = new ProcessingInstructionImpl(0); pi.setTarget(((ProcessingInstruction) child).getTarget()); pi.setData(((ProcessingInstruction) child).getData()); pi.setOwnerDocument(this);  broker.insertAfter(last, pi); return pi; case Node.COMMENT_NODE : final CommentImpl comment = new CommentImpl(0, ((Comment) child).getData()); comment.setOwnerDocument(this); broker.insertAfter(last, comment); return comment; default : throw new DOMException( DOMException.INVALID_MODIFICATION_ERR, "you cannot append a node of this type"); }
public void appendChild(NodeImpl child) throws DOMException { ++children; childList.add(new Long(child.internalAddress));
	private Node appendChild(NodeImpl last, Node child) throws DOMException {		// String ns, prefix;		// Attr attr;		switch (child.getNodeType()) {			case Node.PROCESSING_INSTRUCTION_NODE :				final ProcessingInstructionImpl pi = new ProcessingInstructionImpl(0);				pi.setTarget(((ProcessingInstruction) child).getTarget());				pi.setData(((ProcessingInstruction) child).getData());				pi.setOwnerDocument(this);				//insert the node				broker.insertAfter(last, pi);				return pi;			case Node.COMMENT_NODE :				final CommentImpl comment = new CommentImpl(0, ((Comment) child).getData());				comment.setOwnerDocument(this);				broker.insertAfter(last, comment);				return comment;			default :				throw new DOMException(					DOMException.INVALID_MODIFICATION_ERR,					"you cannot append a node of this type");		}	}