if (node.getNodeType() == Node.ELEMENT_NODE) return node.getChildCount() == 0 ? node : getLastNode((NodeImpl) node.getLastChild()); else return node;
final NodeProxy p = new NodeProxy(ownerDocument, node.gid, node.internalAddress); Iterator iterator = ownerDocument.getBroker().getNodeIterator(p); iterator.next(); return getLastNode(iterator, node);
	protected NodeImpl getLastNode(NodeImpl node) {		if (node.getNodeType() == Node.ELEMENT_NODE)			return node.getChildCount() == 0 ? node : getLastNode((NodeImpl) node.getLastChild());		else			return node;	}