//Remove the actual node data
broker.removeNode(transaction, oldNode, oldPath, null);
broker.endRemove(transaction);
newNode.nodeId = oldNode.nodeId;
//Reinsert the new node data
broker.insertNodeAfter(transaction, previousNode, newNode);
final NodePath path = newNode.getPath(currentPath);
broker.indexNode(transaction, newNode, path);
if (newNode.getNodeType() == Node.ELEMENT_NODE)
{broker.endElement(newNode, path, null);}
broker.updateNode(transaction, this, true);