Unlink the old node from its current context, prune the new
          one at the same place. If @cur was already inserted in a
           document it is first unlinked from its existing context.

def replaceNode(self, cur):
        """Unlink the old node from its current context, prune the new
          one at the same place. If @cur was already inserted in a
           document it is first unlinked from its existing context. """
        if cur is None: cur__o = None
        else: cur__o = cur._o
        ret = libxml2mod.xmlReplaceNode(self._o, cur__o)
        if ret is None:raise treeError('xmlReplaceNode() failed')
        __tmp = xmlNode(_obj=ret)
        return __tmp