ownerDocument.broker.index(newNode);
ownerDocument.broker.index(newNode, newNode.getPath());
    public void updateChild(Node oldChild, Node newChild)            throws DOMException {        if (!(oldChild instanceof NodeImpl))            throw new DOMException(DOMException.WRONG_DOCUMENT_ERR, "wrong node type");        NodeImpl old = (NodeImpl) oldChild;        NodeImpl newNode = (NodeImpl) newChild;        if (old.getParentGID() != gid)            throw new DOMException(DOMException.NOT_FOUND_ERR,                    "node is not a child of this element");        NodeImpl previous = (NodeImpl) old.getPreviousSibling();        if (previous == null)            previous = this;        else            previous = getLastNode(previous);        ownerDocument.broker.removeNode(old, old.getPath());        ownerDocument.broker.endRemove();        newNode.gid = old.gid;        ownerDocument.broker.insertAfter(previous, newNode);        ownerDocument.broker.index(newNode);        ownerDocument.broker.flush();    }